]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
sunvnet: Add missing rcu_read_unlock() in vnet_start_xmit
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Sun, 9 Nov 2014 01:42:20 +0000 (20:42 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Nov 2014 02:05:36 +0000 (21:05 -0500)
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 <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/sunvnet.c

index 826b3852c7df969d130635ff19331618799dcf18..55d66c9a6627be1a6ddc712c7bc81d38653ef887 100644 (file)
@@ -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;