mirror of
https://github.com/openvswitch/ovs
synced 2025-10-21 14:49:41 +00:00
datapath: Take a rcu_dereference() in netdev_get_vport()
Although not strictly necessary, this will make this function more consistent when compatibility for 2.6.36 is added. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
committed by
Jesse Gross
parent
acf8144fa6
commit
f59a10a8b6
@@ -304,7 +304,7 @@ static int netdev_send(struct vport *vport, struct sk_buff *skb)
|
||||
/* Returns null if this device is not attached to a datapath. */
|
||||
struct vport *netdev_get_vport(struct net_device *dev)
|
||||
{
|
||||
return (struct vport *)dev->br_port;
|
||||
return (struct vport *)rcu_dereference(dev->br_port);
|
||||
}
|
||||
|
||||
struct vport_ops netdev_vport_ops = {
|
||||
|
Reference in New Issue
Block a user