Staging: batman-adv: Introduce if_list_lock to protect if_list
authorSven Eckelmann <sven.eckelmann@gmx.de>
Sat, 18 Sep 2010 19:01:15 +0000 (21:01 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 23:29:49 +0000 (16:29 -0700)
commitaf2ac7bfec4176cad5e04402d116b5242d759bf8
tree444bf4077836e828c8d882ddf7c06ef17b136a38
parent67c3b705934af93a09a0f369346c2561499b73c4
Staging: batman-adv: Introduce if_list_lock to protect if_list

The update critical sections of if_list must be protected by a locking
primitive other than RCU. The iterator must also be protected by the
chosen locking mechanism.

The rtnl_lock in hardif_remove_interfaces must also be moved outside the
iterator primitive to ensure that we don't deadlock the kernel due to
differently nested locks in hardif_remove_interfaces and hard_if_event.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/batman-adv/hard-interface.c