Skip to content

Commit b1586f0

Browse files
ebiedermdavem330
authored andcommitted
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>
1 parent 574f719 commit b1586f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/core/netpoll.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static void zap_completion_queue(void)
270270
while (clist != NULL) {
271271
struct sk_buff *skb = clist;
272272
clist = clist->next;
273-
if (skb->destructor) {
273+
if (!skb_irq_freeable(skb)) {
274274
atomic_inc(&skb->users);
275275
dev_kfree_skb_any(skb); /* put this one back */
276276
} else {

0 commit comments

Comments
 (0)