netconsole: don't call __netpoll_cleanup() while atomic
authorVeaceslav Falico <vfalico@redhat.com>
Mon, 11 Mar 2013 00:21:48 +0000 (00:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Mar 2013 10:58:55 +0000 (06:58 -0400)
commit3f315bef23075ea8a98a6fe4221a83b83456d970
tree509a607cd96d11444004a03d4a39efa438eed7c7
parent3da889b616164bde76a37350cf28e0d17a94e979
netconsole: don't call __netpoll_cleanup() while atomic

__netpoll_cleanup() is called in netconsole_netdev_event() while holding a
spinlock. Release/acquire the spinlock before/after it and restart the
loop. Also, disable the netconsole completely, because we won't have chance
after the restart of the loop, and might end up in a situation where
nt->enabled == 1 and nt->np.dev == NULL.

Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netconsole.c