linux-stable/drivers/net/ethernet/sun
Sowmini Varadhan 2a968dd8f7 sunvnet: Use RCU to synchronize port usage with vnet_port_remove()
A vnet_port_remove could be triggered as a result of an ldm-unbind
operation by the peer, module unload, or other changes to the
inter-vnet-link configuration.  When this is concurrent with
vnet_start_xmit(), there are several race sequences possible,
such as

thread 1                                    thread 2
vnet_start_xmit
-> tx_port_find
   spin_lock_irqsave(&vp->lock..)
   ret = __tx_port_find(..)
   spin_lock_irqrestore(&vp->lock..)
                                           vio_remove -> ..
                                               ->vnet_port_remove
                                           spin_lock_irqsave(&vp->lock..)
                                           cleanup
                                           spin_lock_irqrestore(&vp->lock..)
                                           kfree(port)
/* attempt to use ret will bomb */

This patch adds RCU locking for port access so that vnet_port_remove
will correctly clean up port-related state.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Bob Picco <bob.picco@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-25 16:20:15 -04:00
..
cassini.c drivers/net: Convert remaining uses of pr_warning to pr_warn 2014-09-09 20:37:08 -07:00
cassini.h ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
Kconfig Merge branch 'akpm' (incoming from Andrew) 2013-02-21 17:38:49 -08:00
Makefile
niu.c drivers/net: Convert remaining uses of pr_warning to pr_warn 2014-09-09 20:37:08 -07:00
niu.h
sunbmac.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
sunbmac.h
sungem.c sungem: Fix global namespace pollution of phy accessors. 2014-08-27 23:07:12 -07:00
sungem.h
sunhme.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
sunhme.h sunhme: stop using net_device.{base_addr, irq}. 2012-04-07 11:47:03 +02:00
sunqe.c net:drivers/net: Miscellaneous conversions to ETH_ALEN 2013-10-02 17:04:45 -04:00
sunqe.h
sunvnet.c sunvnet: Use RCU to synchronize port usage with vnet_port_remove() 2014-10-25 16:20:15 -04:00
sunvnet.h sunvnet: NAPIfy sunvnet 2014-10-25 16:20:15 -04:00