batman-adv: Fix rcu_barrier() miss due to double call_rcu() in TT code
authorLinus Lüssing <linus.luessing@web.de>
Mon, 15 Apr 2013 13:43:29 +0000 (21:43 +0800)
committerAntonio Quartulli <ordex@autistici.org>
Fri, 17 May 2013 07:54:28 +0000 (09:54 +0200)
commit72822225bd41320a98f5d7cde38317766e18983f
treec1947655ac129d0a1aa3212755097baa9600bb3e
parentb0ce3508b25ea6fa10ae3ca254de1d695b521702
batman-adv: Fix rcu_barrier() miss due to double call_rcu() in TT code

rcu_barrier() only waits for the currently scheduled rcu functions
to finish - it won't wait for any function scheduled via another
call_rcu() within an rcu scheduled function.

Unfortunately our batadv_tt_orig_list_entry_free_ref() does just that,
via a batadv_orig_node_free_ref() call, leading to our rcu_barrier()
call potentially missing such a batadv_orig_node_free_ref().

This patch fixes this issue by calling the batadv_orig_node_free_rcu()
directly from the rcu callback, removing the unnecessary, additional
call_rcu() layer here.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Antonio Quartulli <ordex@autistici.org>
net/batman-adv/originator.c
net/batman-adv/originator.h
net/batman-adv/translation-table.c