diff options
author | Michael Chan <michael.chan@broadcom.com> | 2020-09-03 20:28:54 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-03 21:16:54 +0200 |
commit | 556699341efa98243e08e34401b3f601da91f5a3 (patch) | |
tree | 1049f810bd303c532ddd4cfb196787f3d382e69d /net/smc/smc_llc.c | |
parent | doc: net: dsa: Fix typo in config code sample (diff) | |
download | linux-556699341efa98243e08e34401b3f601da91f5a3.tar.xz linux-556699341efa98243e08e34401b3f601da91f5a3.zip |
tg3: Fix soft lockup when tg3_reset_task() fails.
If tg3_reset_task() fails, the device state is left in an inconsistent
state with IFF_RUNNING still set but NAPI state not enabled. A
subsequent operation, such as ifdown or AER error can cause it to
soft lock up when it tries to disable NAPI state.
Fix it by bringing down the device to !IFF_RUNNING state when
tg3_reset_task() fails. tg3_reset_task() running from workqueue
will now call tg3_close() when the reset fails. We need to
modify tg3_reset_task_cancel() slightly to avoid tg3_close()
calling cancel_work_sync() to cancel tg3_reset_task(). Otherwise
cancel_work_sync() will wait forever for tg3_reset_task() to
finish.
Reported-by: David Christensen <drc@linux.vnet.ibm.com>
Reported-by: Baptiste Covolato <baptiste@arista.com>
Fixes: db2199737990 ("tg3: Schedule at most one tg3_reset_task run")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_llc.c')
0 files changed, 0 insertions, 0 deletions