[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1395727540-12148-54-git-send-email-ebiederm@xmission.com>
Date: Mon, 24 Mar 2014 23:05:40 -0700
From: "Eric W. Biederman" <ebiederm@...ssion.com>
To: David Miller <davem@...emloft.net>
Cc: eric.dumazet@...il.com, netdev@...r.kernel.org,
xiyou.wangcong@...il.com, mpm@...enic.com, satyam.sharma@...il.com,
"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: [PATCH 54/54] if_vlan: Call dev_kfree_skb_any instead of kfree_skb.
From: "Eric W. Biederman" <ebiederm@...ssion.com>
Replace kfree_skb with dev_kfree_skb_any in vlan_insert_tag as
vlan_insert_tag can be called from hard irq context (netpoll)
and from other contexts.
dev_kfree_skb_any is used as vlan_insert_tag only frees the skb if the
skb can not be modified to insert a tag, in which case vlan_insert_tag
drops the skb.
Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
---
include/linux/if_vlan.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index bbedfb56bd66..d3d2306f00bf 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -288,7 +288,7 @@ static inline struct sk_buff *vlan_insert_tag(struct sk_buff *skb,
struct vlan_ethhdr *veth;
if (skb_cow_head(skb, VLAN_HLEN) < 0) {
- kfree_skb(skb);
+ dev_kfree_skb_any(skb);
return NULL;
}
veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists