• Neil Horman's avatar
    3c59x: Fix deadlock between boomerang_interrupt and boomerang_start_tx · aa25ab7d
    Neil Horman authored
    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: default avatarNeil Horman <nhorman@tuxdriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    aa25ab7d
3c59x.c 102 KB