summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sun
diff options
context:
space:
mode:
authorDavid L Stevens <david.stevens@oracle.com>2014-12-09 05:46:09 +0300
committerDavid S. Miller <davem@davemloft.net>2014-12-09 05:55:01 +0300
commit9cdfe2c709c4f6076249ced6844b2bea420739c4 (patch)
tree8d403c3f2d8831a260955f01db29f761b4445fb7 /drivers/net/ethernet/sun
parent58048e6da769e4d2e1c3ab3d1f2ce3a956230d9d (diff)
downloadlinux-9cdfe2c709c4f6076249ced6844b2bea420739c4.tar.xz
sunvnet: fix incorrect rcu_read_unlock() in vnet_start_xmit()
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>
Diffstat (limited to 'drivers/net/ethernet/sun')
-rw-r--r--drivers/net/ethernet/sun/sunvnet.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index aac7d933319b..90c86cd3be14 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -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);