From f59a10a8b676546d120136e20445212c848e7c95 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 23 Aug 2010 15:30:09 +0900 Subject: [PATCH] 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 --- datapath/vport-netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = { -- 2.30.2