From: Simon Horman Date: Mon, 23 Aug 2010 06:30:09 +0000 (+0900) Subject: datapath: Take a rcu_dereference() in netdev_get_vport() X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f59a10a8b676546d120136e20445212c848e7c95;p=openvswitch 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 Signed-off-by: Jesse Gross --- diff --git a/datapath/vport-netdev.c b/datapath/vport-netdev.c index 39e963e0..e6045354 100644 --- a/datapath/vport-netdev.c +++ b/datapath/vport-netdev.c @@ -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 = {