lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 11 Dec 2007 16:38:37 -0800 From: "Brandeburg, Jesse" <jesse.brandeburg@...el.com> To: "Joonwoo Park" <joonwpark81@...il.com> Cc: "David Miller" <davem@...emloft.net>, <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>, <herbert@...dor.apana.org.au>, "Kok, Auke-jan H" <auke-jan.h.kok@...el.com> Subject: RE: [PATCH] [NET]: Fix Ooops of napi net_rx_action. Joonwoo Park wrote: > 2007/12/12, Brandeburg, Jesse <jesse.brandeburg@...el.com>: >> >> all drivers using NAPI in 2.6.24+ (NNAPI??) must return zero here, >> after calling netif_rx_complete. netif_rx_complete plus work_done >> != 0 causes a bug. >> > > Brandeburg, > Don't we need to return non-zero work_done after netif_rx_complete if > work_done != weight? Actually we just need to make sure we don't return work_done == weight as it is checked on line 2210 of dev.c. I should also note that I was wrong above, and that the requirement is that we MUST not return work_done == weight when indicating netif_rx_complete. So, returning 0 when we actually did some work, but are being removed from the poll list because something like !netif_running, is probably okay, but I'm sure someone will disagree with me. Maybe returning like this would be better diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 724f067..76d5e3b 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -3933,6 +3933,10 @@ quit_polling: e1000_set_itr(adapter); netif_rx_complete(poll_dev, napi); e1000_irq_enable(adapter); + if (work_done == weight) + return work_done - 1; + else + return work_done; } return work_done; Jesse -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists