Skip to content

Commit ea91df6

Browse files
Jonathan Toppinsdavem330
authored andcommitted
tg3: prevent scheduling while atomic splat
The problem was introduced in commit 506b0a3 ("[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: 506b0a3 ("[netdrv] tg3: APE heartbeat changes") Signed-off-by: Jonathan Toppins <[email protected]> Acked-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d52e5a7 commit ea91df6

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/broadcom

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/tg3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ static int tg3_ape_event_lock(struct tg3 *tp, u32 timeout_us)
820820

821821
tg3_ape_unlock(tp, TG3_APE_LOCK_MEM);
822822

823-
usleep_range(10, 20);
823+
udelay(10);
824824
timeout_us -= (timeout_us > 10) ? 10 : timeout_us;
825825
}
826826

0 commit comments

Comments
 (0)