aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ntb_netdev.c
diff options
context:
space:
mode:
authorSowmini Varadhan <sowmini.varadhan@oracle.com>2014-10-25 15:12:20 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-25 16:20:15 -0400
commit2a968dd8f7d71ae85c4fe0ff190fbfb4212faf98 (patch)
tree48144487f5fa0b19229ec8d4c50f471fc2745731 /drivers/net/ntb_netdev.c
parentsunvnet: NAPIfy sunvnet (diff)
downloadlinux-dev-2a968dd8f7d71ae85c4fe0ff190fbfb4212faf98.tar.xz
linux-dev-2a968dd8f7d71ae85c4fe0ff190fbfb4212faf98.zip
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>
Diffstat (limited to 'drivers/net/ntb_netdev.c')
0 files changed, 0 insertions, 0 deletions