]> git.baikalelectronics.ru Git - kernel.git/commit
korina: fix deadlock on RX FIFO overrun
authorPhil Sutter <phil@nwl.cc>
Sat, 29 May 2010 13:23:34 +0000 (13:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Jun 2010 13:12:18 +0000 (06:12 -0700)
commit6aaac6dda75771384f0ddf5c983cd9ee65db2ef8
tree8bd8cb8d9af745ed0aa2e55a1b0e8ef51b74020a
parentd85404e20f08b0cddabdf4fadda0b945b40c72eb
korina: fix deadlock on RX FIFO overrun

By calling korina_restart(), the IRQ handler tries to disable the
interrupt it's currently serving. This leads to a deadlock since
disable_irq() waits for any running IRQ handlers to finish before
returning. This patch addresses the issue by turning korina_restart()
into a workqueue task, which is then scheduled when needed.

Reproducing the deadlock is easily done using e.g. GNU netcat to send
large amounts of UDP data to the host running this driver.

Note that the same problem (and fix) applies to TX FIFO underruns, but
apparently these are less easy to trigger.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/korina.c