diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 15:22:44 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 15:22:44 -0700 |
commit | 1a4ceab195e66bce9c1638fdded6d92988100ba4 (patch) | |
tree | 3ec17bd66fb3ac1429131e373cc8d99550d5451a /net/batman-adv/translation-table.c | |
parent | 83f89ca755c9f783b8229d968c4e9d2c660ca427 (diff) | |
parent | 6a32e4f9dd9219261f8856f817e6655114cfec2f (diff) | |
download | talos-op-linux-1a4ceab195e66bce9c1638fdded6d92988100ba4.tar.gz talos-op-linux-1a4ceab195e66bce9c1638fdded6d92988100ba4.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
vlan: allow nested vlan_do_receive()
ipv6: fix route lookup in addrconf_prefix_rcv()
bonding: eliminate bond_close race conditions
qlcnic: fix beacon and LED test.
qlcnic: Updated License file
qlcnic: updated reset sequence
qlcnic: reset loopback mode if promiscous mode setting fails.
qlcnic: skip IDC ack check in fw reset path.
i825xx: Fix incorrect dependency for BVME6000_NET
ipv6: fix route error binding peer in func icmp6_dst_alloc
ipv6: fix error propagation in ip6_ufo_append_data()
stmmac: update normal descriptor structure (v2)
stmmac: fix NULL pointer dereference in capabilities fixup (v2)
stmmac: fix a bug while checking the HW cap reg (v2)
be2net: Changing MAC Address of a VF was broken.
be2net: Refactored be_cmds.c file.
bnx2x: update driver version to 1.70.30-0
bnx2x: use FW 7.0.29.0
bnx2x: Enable changing speed when port type is PORT_DA
bnx2x: Fix 54618se LED behavior
...
Diffstat (limited to 'net/batman-adv/translation-table.c')
-rw-r--r-- | net/batman-adv/translation-table.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 873fb3d8e56f..c7aafc7c5ed4 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -137,10 +137,22 @@ static void tt_local_entry_free_ref(struct tt_local_entry *tt_local_entry) kfree_rcu(tt_local_entry, rcu); } +static void tt_global_entry_free_rcu(struct rcu_head *rcu) +{ + struct tt_global_entry *tt_global_entry; + + tt_global_entry = container_of(rcu, struct tt_global_entry, rcu); + + if (tt_global_entry->orig_node) + orig_node_free_ref(tt_global_entry->orig_node); + + kfree(tt_global_entry); +} + static void tt_global_entry_free_ref(struct tt_global_entry *tt_global_entry) { if (atomic_dec_and_test(&tt_global_entry->refcount)) - kfree_rcu(tt_global_entry, rcu); + call_rcu(&tt_global_entry->rcu, tt_global_entry_free_rcu); } static void tt_local_event(struct bat_priv *bat_priv, const uint8_t *addr, @@ -710,6 +722,9 @@ void tt_global_del_orig(struct bat_priv *bat_priv, struct hlist_head *head; spinlock_t *list_lock; /* protects write access to the hash lists */ + if (!hash) + return; + for (i = 0; i < hash->size; i++) { head = &hash->table[i]; list_lock = &hash->list_locks[i]; |