Skip to content

Commit 29cb99d

Browse files
Antonio Quartullidavem330
authored andcommitted
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 <ordex@autistici.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1f129fe commit 29cb99d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/batman-adv/translation-table.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ static void batadv_tt_orig_list_entry_free_rcu(struct rcu_head *rcu)
149149
static void
150150
batadv_tt_orig_list_entry_free_ref(struct tt_orig_list_entry *orig_entry)
151151
{
152+
/* to avoid race conditions, immediately decrease the tt counter */
153+
atomic_dec(&orig_entry->orig_node->tt_size);
152154
call_rcu(&orig_entry->rcu, batadv_tt_orig_list_entry_free_rcu);
153155
}
154156

0 commit comments

Comments
 (0)