Skip to contentSkip to conversation

6lowpan: double unlock on an error path

PATCH In review Dan Carpenter 3 participants 3 messages Jun 27, 2012

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

PATCH 1/1 6lowpan: double unlock on an error path

We already unlocked a few lines earlier here, so we can go directly to drop without passing through unlock. This was introduced recently in c5d3687f6c ('6lowpan: read data from skb safely').

net/ieee802154/6lowpan.c +1 -1
index ad0c226..cd5007f 100644
@@ -771,7 +771,7 @@ lowpan_process_data(struct sk_buff *skb)
 			kfree(frame);
 
 			if (lowpan_fetch_skb_u8(skb, &iphc0))
-				goto unlock_and_drop;
+				goto drop;
 
 			break;
 		}
Acked-by on v1 1/1
#1 lore raw

2012/6/27 Dan Carpenter <[email protected]>:

Quoted 11 lines

We already unlocked a few lines earlier here, so we can go directly to drop without passing through unlock.  This was introduced recently in c5d3687f6c ('6lowpan: read data from skb safely').

net/ieee802154/6lowpan.c +0 -0
index ad0c226..cd5007f 100644

net/ieee802154/6lowpan.c lowpan_process_data(struct sk_buff *skb) · line 777

Quoted 8 lines
net/ieee802154/6lowpan.c +1 -1
@@ -771,7 +771,7 @@ lowpan_process_data(struct sk_buff *skb)
                        kfree(frame);
 
                        if (lowpan_fetch_skb_u8(skb, &iphc0))
-                               goto unlock_and_drop;
+                               goto drop;
 
                        break;
                }

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#2 lore raw

From: Alexander Smirnov <[email protected]>
Date: Wed, 27 Jun 2012 10:57:18 +0400

Quoted 6 lines

2012/6/27 Dan Carpenter <[email protected]>:

Quoted 5 lines

We already unlocked a few lines earlier here, so we can go directly to drop without passing through unlock.  This was introduced recently in c5d3687f6c ('6lowpan: read data from skb safely').

...

Quoted 1 line

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html