From: Antonio Quartulli Date: Mon, 25 Jun 2012 20:49:51 +0000 (+0000) Subject: batman-adv: fix global TT entry deletion X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29cb99de4dafc53f75389bbe0173af4385a2ed1d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git batman-adv: fix global TT entry deletion During the last merge involving translation-table.c something went wrong and two lines disappeared from translation-table.c. This patch recovers them. Signed-off-by: Antonio Quartulli Signed-off-by: David S. Miller --- diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index e4f27a872c9c..c673b58f3ee1 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -149,6 +149,8 @@ static void batadv_tt_orig_list_entry_free_rcu(struct rcu_head *rcu) static void batadv_tt_orig_list_entry_free_ref(struct tt_orig_list_entry *orig_entry) { + /* to avoid race conditions, immediately decrease the tt counter */ + atomic_dec(&orig_entry->orig_node->tt_size); call_rcu(&orig_entry->rcu, batadv_tt_orig_list_entry_free_rcu); }