History

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.

Eric W. Biederman committed 12 years ago

Commit b1586f01 parent 574f7191 file · +1 −1Browse files

Unified · Split

net/core/netpoll.c+1−1
@@ -270,7 +270,7 @@ static void zap_completion_queue(void) · 269 unmodified lines
270 while (clist != NULL) {270 while (clist != NULL) {
271 struct sk_buff *skb = clist;271 struct sk_buff *skb = clist;
272 clist = clist->next;272 clist = clist->next;
273 if (skb->destructor) {273 if (!skb_irq_freeable(skb)) {
274 atomic_inc(&skb->users);274 atomic_inc(&skb->users);
275 dev_kfree_skb_any(skb); /* put this one back */275 dev_kfree_skb_any(skb); /* put this one back */
276 } else {276 } else {