Message ID | 8761mzktj9.fsf_-_@x220.int.ebiederm.org |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Hello. On 28-03-2014 5:20, Eric W. Biederman wrote: > Replace the test in zap_completion_queu to test when it is safe to Small typo: it's zap_completion_queue(). > 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> WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index af8dc13d69d6..a0563642c5b5 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 {
Replace the test in zap_completion_queu 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> --- net/core/netpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)