diff options
author | Jonathan Toppins <jtoppins@redhat.com> | 2018-03-14 17:36:25 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-14 18:43:02 +0100 |
commit | ea91df6d8a55836c7401eb6d5d4d828b659d8d67 (patch) | |
tree | 3e3b6edcd3b4c5d15345b5db6ef975341b08223d /drivers/net/ethernet/broadcom/tg3.c | |
parent | ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu (diff) | |
download | linux-ea91df6d8a55836c7401eb6d5d4d828b659d8d67.tar.xz linux-ea91df6d8a55836c7401eb6d5d4d828b659d8d67.zip |
tg3: prevent scheduling while atomic splat
The problem was introduced in commit
506b0a395f26 ("[netdrv] tg3: APE heartbeat changes"). The bug occurs
because tp->lock spinlock is held which is obtained in tg3_start
by way of tg3_full_lock(), line 11571. The documentation for usleep_range()
specifically states it cannot be used inside a spinlock.
Fixes: 506b0a395f26 ("[netdrv] tg3: APE heartbeat changes")
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
Acked-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index c1841db1b500..f2593978ae75 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -820,7 +820,7 @@ static int tg3_ape_event_lock(struct tg3 *tp, u32 timeout_us) tg3_ape_unlock(tp, TG3_APE_LOCK_MEM); - usleep_range(10, 20); + udelay(10); timeout_us -= (timeout_us > 10) ? 10 : timeout_us; } |