diff options
author | Neil Horman <nhorman@tuxdriver.com> | 2010-08-11 07:12:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-24 10:47:40 +0200 |
commit | aa25ab7d943a5e1e6bcc2a65ff6669144f5b5d60 (patch) | |
tree | 86b4d306cea36eb547a88f59c2568a16b9bac700 /lib/bug.c | |
parent | qlcnic: fix poll implementation (diff) | |
download | linux-aa25ab7d943a5e1e6bcc2a65ff6669144f5b5d60.tar.xz linux-aa25ab7d943a5e1e6bcc2a65ff6669144f5b5d60.zip |
3c59x: Fix deadlock between boomerang_interrupt and boomerang_start_tx
If netconsole is in use, there is a possibility for deadlock in 3c59x between
boomerang_interrupt and boomerang_start_xmit. Both routines take the vp->lock,
and if netconsole is in use, a pr_* call from the boomerang_interrupt routine
will result in the netconsole code attempting to trnasmit an skb, which can try
to take the same spin lock, resulting in deadlock.
The fix is pretty straightforward. This patch allocats a bit in the 3c59x
private structure to indicate that its handling an interrupt. If we get into
the transmit routine and that bit is set, we can be sure that we have recursed
and will deadlock if we continue, so instead we just return NETDEV_TX_BUSY, so
the stack requeues the skb to try again later.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/bug.c')
0 files changed, 0 insertions, 0 deletions