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: Thu, 23 Aug 2007 18:21:25 +0200 From: Jan-Bernd Themann <ossthema@...ibm.com> To: David.Miller@...-9-152-217-48 Cc: netdev <netdev@...r.kernel.org>, Christoph Raisch <raisch@...ibm.com>, Thomas Klein <osstklei@...ibm.com> Subject: New NAPI interface: netif_rx_reschedule not working Hi David, when trying to get our driver working with the new interface, I found the following issue where I'm not sure how to solve it best: netif_rx_reschedule() does not work when called after netif_rx_complete(). The problem is that netif_rx_reschedule currently adds the napi struct once more to the poll list. However, net_rx_action will add it to the poll list as well (NAPI_STATE_SCHED set), so the device is scheduled twice. Next time netif_rx_complete is called for the second schedule, it will result in BUG() because NAPI_STATE_SCHED is not set anymore (cleared by first netif_rx_complete()). Modifying netif_rx_reschedule to only set NAPI_STATE_SCHED flag again and not adding the device to the poll_list will not solve the problem entirely. After netif_rx_complete() the driver activates the IRQs again. If an IRQ is caught on a different CPU before netif_rx_reschedule is called, we will have the napi device scheduled twice again... because net_rx_action will schedule it and netif_rx_schedule as well (add it to poll_list). I think this is an issue that can even occur if you don't use netif_rx_reschedule. Do I understand this correctly? Thanks, Jan-Bernd - 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