From: Sowmini Varadhan Date: Sun, 9 Nov 2014 01:42:20 +0000 (-0500) Subject: sunvnet: Add missing rcu_read_unlock() in vnet_start_xmit X-Git-Tag: v5.15~16721^2~231^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df20286ab1e36eaaf1f6c7e5e2c56bea1ffc26c0;p=platform%2Fkernel%2Flinux-starfive.git sunvnet: Add missing rcu_read_unlock() in vnet_start_xmit The out_dropped label will only do rcu_read_unlock for non-null port. So add the missing rcu_read_unlock() when bailing due to non-null port. Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index 826b385..55d66c9 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c @@ -981,8 +981,10 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev) rcu_read_lock(); port = __tx_port_find(vp, skb); - if (unlikely(!port)) + if (unlikely(!port)) { + rcu_read_unlock(); goto out_dropped; + } if (skb->len > port->rmtu) { unsigned long localmtu = port->rmtu - ETH_HLEN;