diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2014-04-01 23:21:02 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-02 01:53:36 +0400 |
commit | b1586f099ba897542ece36e8a23c1a62907261ef (patch) | |
tree | 24022cea66ee2f01d37f22a94e6d0d5f71988980 /net/core/netpoll.c | |
parent | 574f7194f693cd80de96a39f0c43dbb346c38a15 (diff) | |
download | linux-b1586f099ba897542ece36e8a23c1a62907261ef.tar.xz |
netpoll: Use skb_irq_freeable to make zap_completion_queue safe.
Replace the test in zap_completion_queue to test when it is safe to
free skbs in hard irq context with skb_irq_freeable ensuring we only
free skbs when it is safe, and removing the possibility of subtle
problems.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r-- | net/core/netpoll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index ed7740f7a94d..e33937fb32a0 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -270,7 +270,7 @@ static void zap_completion_queue(void) while (clist != NULL) { struct sk_buff *skb = clist; clist = clist->next; - if (skb->destructor) { + if (!skb_irq_freeable(skb)) { atomic_inc(&skb->users); dev_kfree_skb_any(skb); /* put this one back */ } else { |