sunvnet: fix incorrect rcu_read_unlock() in vnet_start_xmit()
authorDavid L Stevens <david.stevens@oracle.com>
Tue, 9 Dec 2014 02:46:09 +0000 (21:46 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Dec 2014 02:55:01 +0000 (21:55 -0500)
This patch removes an extra rcu_read_unlock() on an allocation failure
in vnet_skb_shape(). The needed rcu_read_unlock() is already done in
the out_dropped label.

Reported-by: Rashmi Narasimhan <rashmi.narasimhan@oracle.com>
Signed-off-by: David L Stevens <david.stevens@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/sunvnet.c

index aac7d93..90c86cd 100644 (file)
@@ -1317,10 +1317,8 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        skb = vnet_skb_shape(skb, 2);
 
-       if (unlikely(!skb)) {
-               rcu_read_unlock();
+       if (unlikely(!skb))
                goto out_dropped;
-       }
 
        if (skb->ip_summed == CHECKSUM_PARTIAL)
                vnet_fullcsum(skb);