summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-04-27 04:39:08 +0200
committerDavid S. Miller <davem@davemloft.net>2017-04-27 04:39:08 +0200
commitb1513c35317c106a1588f3ab32f6888f0e2afd71 (patch)
treeb2cd68a0d34dd04eb89fcf28e173e5ee22f898fd /net/core
parentvirtio-net: on tx, only call napi_disable if tx napi is on (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc (diff)
downloadlinux-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.c3
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);