The following commit has been merged in the merge/master branch: commit 71c7948eafcd10f55a34a92abc7af2a743c1e7d1 Merge: 5a441b8f246a72a818dbd5790433f9d179ac7681 474f9178314dc440d3be1df8e1af0f222ad7aff1 Author: Marek Lindner lindner_marek@yahoo.de Date: Tue Oct 25 14:17:11 2011 +0200
Merge remote-tracking branch 'origin/standalone/next' into merge/master
Conflicts: net/batman-adv/compat.c net/batman-adv/compat.h
diff --combined net/batman-adv/translation-table.c index 873fb3d,c7aafc7..c7aafc7 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@@ -137,10 -137,22 +137,22 @@@ static void tt_local_entry_free_ref(str 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 +722,9 @@@ void tt_global_del_orig(struct bat_pri 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]; diff --combined net/batman-adv/types.h index 1ae3557,ab8d0fe..ab8d0fe --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@@ -224,22 -224,22 +224,22 @@@ struct socket_packet
struct tt_local_entry { uint8_t addr[ETH_ALEN]; + struct hlist_node hash_entry; unsigned long last_seen; uint16_t flags; atomic_t refcount; struct rcu_head rcu; - struct hlist_node hash_entry; };
struct tt_global_entry { uint8_t addr[ETH_ALEN]; + struct hlist_node hash_entry; /* entry in the global table */ struct orig_node *orig_node; uint8_t ttvn; uint16_t flags; /* only TT_GLOBAL_ROAM is used */ unsigned long roam_at; /* time at which TT_GLOBAL_ROAM was set */ atomic_t refcount; struct rcu_head rcu; - struct hlist_node hash_entry; /* entry in the global table */ };
struct tt_change_node {