Commit 401da6ae authored by Alan Cox's avatar Alan Cox Committed by David S. Miller

e100: Fix the TX workqueue race

Nothing stops the workqueue being left to run in parallel with close or a
few other operations. This causes double unmaps and the like.

See kerneloops.org #1041230 for an example
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7ce97d4f
...@@ -166,6 +166,7 @@ ...@@ -166,6 +166,7 @@
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/firmware.h> #include <linux/firmware.h>
#include <linux/rtnetlink.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
...@@ -2265,8 +2266,13 @@ static void e100_tx_timeout_task(struct work_struct *work) ...@@ -2265,8 +2266,13 @@ static void e100_tx_timeout_task(struct work_struct *work)
DPRINTK(TX_ERR, DEBUG, "scb.status=0x%02X\n", DPRINTK(TX_ERR, DEBUG, "scb.status=0x%02X\n",
ioread8(&nic->csr->scb.status)); ioread8(&nic->csr->scb.status));
e100_down(netdev_priv(netdev));
e100_up(netdev_priv(netdev)); rtnl_lock();
if (netif_running(netdev)) {
e100_down(netdev_priv(netdev));
e100_up(netdev_priv(netdev));
}
rtnl_unlock();
} }
static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode) static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment