]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: batman-adv: Don't remove interface with spinlock held
authorSven Eckelmann <sven.eckelmann@gmx.de>
Mon, 22 Nov 2010 11:34:50 +0000 (12:34 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Nov 2010 18:53:14 +0000 (10:53 -0800)
commit0049f61cde6bd5dfe82296466e61d5a33df937e7
treebcc05c7f9cf249b2391989a222e5e5f268886b4d
parent9342626ca02194a4da77f8565a099e263515bcd8
Staging: batman-adv: Don't remove interface with spinlock held

We call a lot of the netdevice code when holding if_list_lock which will
spin the whole time. This is not necessary because we only want to
protect the access to the list to be serialized. An extra queue can be
used which hold all interfaces which should be removed and then use that
queue without any locks for netdevice cleanup.

We create a "scheduling while atomic" Oops when calling different
netdevice related functions inside a spinlock protected area on a
preemtible kernel.

Reported-by: Rafal Lesniak <lesniak@eresi-project.org>
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