linux/drivers/net/bonding
Neil Horman e843fa5088 bonding: Fix deadlock in bonding driver resulting from internal locking when using netpoll
The monitoring paths in the bonding driver take write locks that are shared by
the tx path.  If netconsole is in use, these paths can call printk which puts us
in the netpoll tx path, which, if netconsole is attached to the bonding driver,
result in deadlock (the xmit_lock guards are useless in netpoll_send_skb, as the
monitor paths in the bonding driver don't claim the xmit_lock, nor should they).
The solution is to use a per cpu flag internal to the driver to indicate when a
cpu is holding the lock in a path that might recusrse into the tx path for the
driver via netconsole.  By checking this flag on transmit, we can defer the
sending of the netconsole frames until a later time using the retransmit feature
of netpoll_send_skb that is triggered on the return code NETDEV_TX_BUSY.  I've
tested this and am able to transmit via netconsole while causing failover
conditions on the bond slave links.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-18 08:32:07 -07:00
..
bond_3ad.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-09-27 01:03:03 -07:00
bond_3ad.h Remove duplicate slow protocol define in bond_3ad.h 2009-05-09 13:15:49 -07:00
bond_alb.c bonding: correctly process non-linear skbs 2010-09-14 14:25:32 -07:00
bond_alb.h Convert bonding timers to workqueues 2007-10-23 20:32:00 -04:00
bond_ipv6.c bonding: fix bond_inet6addr_event() 2010-07-19 09:34:31 -07:00
bond_main.c bonding: Fix deadlock in bonding driver resulting from internal locking when using netpoll 2010-10-18 08:32:07 -07:00
bond_sysfs.c bonding: Fix deadlock in bonding driver resulting from internal locking when using netpoll 2010-10-18 08:32:07 -07:00
bonding.h bonding: Fix deadlock in bonding driver resulting from internal locking when using netpoll 2010-10-18 08:32:07 -07:00
Makefile bonding: send IPv6 neighbor advertisement on failover 2008-11-06 00:49:37 -05:00