In the Linux kernel, the following vulnerability has been resolved:
net: ks8851: Queue RX packets in IRQ handler instead of disabling BHs
Currently the driver uses localbhdisable()/localbhenable() in its IRQ handler to avoid triggering netrxaction() softirq on exit from netifrx(). The netrxaction() could trigger this driver .startxmit callback, which is protected by the same lock as the IRQ handler, so calling the .startxmit from netifrx() from the IRQ handler critical section protected by the lock could lead to an attempt to claim the already claimed lock, and a hang.
The localbhdisable()/localbhenable() approach works only in case the IRQ handler is protected by a spinlock, but does not work if the IRQ handler is protected by mutex, i.e. this works for KS8851 with Parallel bus interface, but not for KS8851 with SPI bus interface.
Remove the BH manipulation and instead of calling netifrx() inside the IRQ handler code protected by the lock, queue all the received SKBs in the IRQ handler into a queue first, and once the IRQ handler exits the critical section protected by the lock, dequeue all the queued SKBs and push them all into netifrx(). At this point, it is safe to trigger the netrxaction() softirq, since the netif_rx() call is outside of the lock that protects the IRQ handler.