diff options
author | David S. Miller <davem@davemloft.net> | 2017-04-27 04:39:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-27 04:39:08 +0200 |
commit | b1513c35317c106a1588f3ab32f6888f0e2afd71 (patch) | |
tree | b2cd68a0d34dd04eb89fcf28e173e5ee22f898fd /net/core | |
parent | virtio-net: on tx, only call napi_disable if tx napi is on (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc (diff) | |
download | linux-b1513c35317c106a1588f3ab32f6888f0e2afd71.tar.xz linux-b1513c35317c106a1588f3ab32f6888f0e2afd71.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 1b3317c026c6..3361ee87fcc2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2451,6 +2451,9 @@ void __dev_kfree_skb_irq(struct sk_buff *skb, enum skb_free_reason reason) { unsigned long flags; + if (unlikely(!skb)) + return; + if (likely(atomic_read(&skb->users) == 1)) { smp_rmb(); atomic_set(&skb->users, 0); |