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)
commitceb3d2394532540a52ce34f71e67c8d008913f79
tree8bd8cb8d9af745ed0aa2e55a1b0e8ef51b74020a
parent2df4a0fa1540c460ec69788ab2a901cc72a75644
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