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