From: Nikolay Aleksandrov Date: Thu, 19 Sep 2013 13:02:36 +0000 (+0200) Subject: netconsole: fix a deadlock with rtnl and netconsole's mutex X-Git-Tag: v3.12-rc2~14^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c71380ff0b199f1e8be5ca46dd91262f7fbe4cb4;p=pandora-kernel.git netconsole: fix a deadlock with rtnl and netconsole's mutex This bug was introduced by commit 7a163bfb7ce50895bbe67300ea610d31b9c09230 ("netconsole: avoid a crash with multiple sysfs writers"). In store_enabled() we have the following sequence: acquire nt->mutex then rtnl, but in the netconsole netdev notifier we have rtnl then nt->mutex effectively leading to a deadlock. The NULL pointer dereference that the above commit tries to fix is actually due to another bug in netpoll_cleanup(). This is fixed by dropping the mutex from the netdev notifier as it's already protected by rtnl. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller --- Reading git-diff-tree failed