In the Linux kernel, the following vulnerability has been resolved: net: 8139cp: keep Rx masked while NAPI is scheduled cp_rx_poll() calls napi_complete_done() and only then takes cp->lock with interrupts disabled to unmask the Rx interrupts. An interrupt that is not masked while polling (TxOK, TxErr, ...) can arrive in between. cp_interrupt() then sees the Rx status bits, which are still set, finds NAPI no longer scheduled, masks Rx and schedules NAPI again. cp_rx_poll() then carries on and unmasks Rx anyway. From that point Rx interrupts are enabled while NAPI is scheduled: cp_interrupt() leaves the Rx bits for the poll routine, does not mask them because napi_schedule_prep() fails, and the level-triggered interrupt fires again as soon as it returns. On an SH7751 LANDISK under combined Tx/Rx load this interrupt storm was captured with a RAM trace right before the board locked up hard. Mask Rx in cp_interrupt() whenever Rx status is pending, not only when NAPI gets scheduled. If the race leaves Rx unmasked, the next interrupt masks it again, and the pending poll unmasks it when it completes.
https://git.kernel.org/stable/c/e6fdd6e2cb7c0f42dd11b5b90947eb006742b6c2
https://git.kernel.org/stable/c/c566302e05f434bc7a551199e4d21b85c4ebdfe9
https://git.kernel.org/stable/c/7282397183ff7eee181eeda434fce5fb637e503c
https://git.kernel.org/stable/c/547b1ae5ec50b7d81b05b4219e0db7e56279d65f
https://git.kernel.org/stable/c/4f7cde5c0328462940c5b6a8f9b27f1d589bb0b7
https://git.kernel.org/stable/c/2396429ea7c1f9c0a6c2d2c5adb19f66d025eff9