Commit 9899886d authored by Myungho Jung's avatar Myungho Jung Committed by David S. Miller

net: core: Prevent from dereferencing null pointer when releasing SKB

Added NULL check to make __dev_kfree_skb_irq consistent with kfree
family of functions.

Link: default avatarMyungho Jung <>
Signed-off-by: default avatarDavid S. Miller <>
parent 5294b830
......@@ -2450,6 +2450,9 @@ void __dev_kfree_skb_irq(struct sk_buff *skb, enum skb_free_reason reason)
unsigned long flags;
if (unlikely(!skb))
if (likely(atomic_read(&skb->users) == 1)) {
atomic_set(&skb->users, 0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment