batman-adv: postpone sysfs removal when unregistering
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
Fri, 11 Jan 2013 09:19:51 +0000 (10:19 +0100)
committerAntonio Quartulli <ordex@autistici.org>
Sat, 19 Jan 2013 13:18:12 +0000 (21:18 +0800)
commit5bc44dc8458cbac08c664f2f337326bf87cc924b
tree05828c0b6a6f00138a539c0ce39e3ea0b109dbce
parente76e4320a26ba6301dfd3e9a28a1e3faccd302ab
batman-adv: postpone sysfs removal when unregistering

When processing the unregister notify for a hard interface, removing
the sysfs files may lead to a circular deadlock (rtnl mutex <->
s_active).

To overcome this problem, postpone the sysfs removal in a worker.

Reported-by: Sasha Levin <sasha.levin@oracle.com>
Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
net/batman-adv/hard-interface.c
net/batman-adv/soft-interface.c
net/batman-adv/types.h