Skip to contentSkip to conversation

sunvnet: fix incorrect rcu_read_unlock() in vnet_start_xmit()

PATCH Applied David L Stevens 2 participants 2 messages Dec 9, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/ethernet/sun/sunvnet.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/net/ethernet/sun/sunvnet.c +1 -3
index b883add..36fdf52 100644
@@ -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);
Signature · 1 line
1.7.1