diff options
author | Simon Kagstrom <simon.kagstrom@netinsight.net> | 2010-02-10 00:38:25 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-10 19:55:02 +0100 |
commit | 3f2e8d9f13246382fbda6f03178eef867a9bfbe2 (patch) | |
tree | 69ef8e92e70e8739e5121e7705a696bc63691d38 /drivers/net/lne390.c | |
parent | via-velocity: Take spinlock on set coalesce (diff) | |
download | linux-3f2e8d9f13246382fbda6f03178eef867a9bfbe2.tar.xz linux-3f2e8d9f13246382fbda6f03178eef867a9bfbe2.zip |
via-velocity: Fix races on shared interrupts
This patch fixes two potential races in the velocity driver:
* Move the ACK and error handler to the interrupt handler. This fixes a
potential race with shared interrupts when the other device interrupts
before the NAPI poll handler has finished. As the velocity driver hasn't
acked it's own interrupt, it will then steal the interrupt from the
other device.
* Use spin_lock_irqsave in velocity_poll. In the current code, the
interrupt handler will deadlock if e.g., the NAPI poll handler is
executing when an interrupt (for another device) comes in since it
tries to take the already held lock.
Also unlock the spinlock only after enabling the interrupt in
velocity_poll.
The error path is moved to the interrupt handler since this is where the
ISR is checked now.
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Anders Grafstrom <anders.grafstrom@netinsight.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/lne390.c')
0 files changed, 0 insertions, 0 deletions