alistair23-linux/net/batman-adv
Sven Eckelmann 63b3992722 batman-adv: Avoid recursive call_rcu for batadv_bla_claim
The batadv_claim_free_ref function uses call_rcu to delay the free of the
batadv_bla_claim object until no (already started) rcu_read_lock is enabled
anymore. This makes sure that no context is still trying to access the
object which should be removed. But batadv_bla_claim also contains a
reference to backbone_gw which must be removed.

The reference drop of backbone_gw was done in the call_rcu function
batadv_claim_free_rcu but should actually be done in the
batadv_claim_release function to avoid nested call_rcus. This is important
because rcu_barrier (e.g. batadv_softif_free or batadv_exit) will not
detect the inner call_rcu as relevant for its execution. Otherwise this
barrier will most likely be inserted in the queue before the callback of
the first call_rcu was executed. The caller of rcu_barrier will therefore
continue to run before the inner call_rcu callback finished.

Fixes: 23721387c4 ("batman-adv: add basic bridge loop avoidance code")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
2016-01-16 22:48:29 +08:00
..
bat_algo.h batman-adv: update copyright years for 2015 2015-05-29 10:13:35 +02:00
bat_iv_ogm.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-11 23:55:43 -05:00
bitarray.c batman-adv: Replace C99 int types with kernel type 2015-08-25 00:12:17 +02:00
bitarray.h batman-adv: Replace C99 int types with kernel type 2015-08-25 00:12:17 +02:00
bridge_loop_avoidance.c batman-adv: Avoid recursive call_rcu for batadv_bla_claim 2016-01-16 22:48:29 +08:00
bridge_loop_avoidance.h batman-adv: purge bridge loop avoidance when its disabled 2016-01-09 20:56:00 +08:00
debugfs.c batman-adv: export single hop neighbor list via debugfs 2015-12-16 00:21:42 +08:00
debugfs.h batman-adv: Remove batadv_ types forward declarations 2015-08-25 00:12:20 +02:00
distributed-arp-table.c batman-adv: Fix invalid stack access in batadv_dat_select_candidates 2015-12-07 22:40:21 +08:00
distributed-arp-table.h batman-adv: Replace C99 int types with kernel type 2015-08-25 00:12:17 +02:00
fragmentation.c batman-adv: Use chain pointer when purging fragments 2015-12-16 15:17:09 +08:00
fragmentation.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
gateway_client.c batman-adv: fix gateway client style issues 2015-08-27 20:15:32 +02:00
gateway_client.h batman-adv: remove obsolete deleted attribute for gateway node 2015-08-27 20:15:32 +02:00
gateway_common.c batman-adv: Add function to convert string to batadv throughput 2016-01-09 20:56:00 +08:00
gateway_common.h batman-adv: Remove batadv_ types forward declarations 2015-08-25 00:12:20 +02:00
hard-interface.c batman-adv: add list of unique single hop neighbors per hard-interface 2015-12-16 00:21:41 +08:00
hard-interface.h batman-adv: Add required includes to all files 2015-06-07 17:07:19 +02:00
hash.c batman-adv: Replace C99 int types with kernel type 2015-08-25 00:12:17 +02:00
hash.h batman-adv: Replace C99 int types with kernel type 2015-08-25 00:12:17 +02:00
icmp_socket.c batman-adv: Fix kerneldoc over 80 column lines 2015-08-25 00:12:18 +02:00
icmp_socket.h batman-adv: Remove batadv_ types forward declarations 2015-08-25 00:12:20 +02:00
Kconfig batman-adv: Kconfig, Add missing DEBUG_FS dependency 2015-01-07 22:17:11 +01:00
main.c batman-adv: Less checks in batadv_tvlv_unicast_send() 2016-01-09 20:56:00 +08:00
main.h batman-adv: increase BLA wait periods to 6 2016-01-09 20:56:00 +08:00
Makefile batman-adv: Makefile, Sort alphabetically 2015-05-29 10:13:36 +02:00
multicast.c batman-adv: fix lockdep splat when doing mcast_free 2016-01-13 19:26:25 +08:00
multicast.h batman-adv: Remove batadv_ types forward declarations 2015-08-25 00:12:20 +02:00
network-coding.c batman-adv: Delete unnecessary checks before the function call "kfree_skb" 2016-01-09 20:56:00 +08:00
network-coding.h batman-adv: Remove batadv_ types forward declarations 2015-08-25 00:12:20 +02:00
originator.c batman-adv: Fix list removal of batadv_hardif_neigh_node 2016-01-13 19:28:27 +08:00
originator.h batman-adv: export single hop neighbor list via debugfs 2015-12-16 00:21:42 +08:00
packet.h batman-adv: remove leftovers of unused BATADV_PRIMARIES_FIRST_HOP flag 2016-01-09 20:56:00 +08:00
routing.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-12-17 22:08:28 -05:00
routing.h batman-adv: Remove batadv_ types forward declarations 2015-08-25 00:12:20 +02:00
send.c batman-adv: Delete unnecessary checks before the function call "kfree_skb" 2016-01-09 20:56:00 +08:00
send.h batman-adv: Remove batadv_ types forward declarations 2015-08-25 00:12:20 +02:00
soft-interface.c batman-adv: Add lower layer needed_(head|tail)room to own ones 2015-08-27 20:15:34 +02:00
soft-interface.h batman-adv: Remove batadv_ types forward declarations 2015-08-25 00:12:20 +02:00
sysfs.c batman-adv: only call post function if something changed 2016-01-09 20:56:00 +08:00
sysfs.h batman-adv: Remove batadv_ types forward declarations 2015-08-25 00:12:20 +02:00
translation-table.c batman-adv: Split a condition check 2016-01-09 20:56:00 +08:00
translation-table.h batman-adv: Remove batadv_ types forward declarations 2015-08-25 00:12:20 +02:00
types.h batman-adv: Add kerneldoc for batadv_neigh_node::refcount 2016-01-09 20:56:00 +08:00