]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: prevent scheduling while atomic splat
authorJonathan Toppins <jtoppins@redhat.com>
Wed, 14 Mar 2018 16:36:25 +0000 (12:36 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Mar 2018 17:43:02 +0000 (13:43 -0400)
commite9773ac91a6a4a3ef5a27be11fb9d29cc25c5caa
tree3e3b6edcd3b4c5d15345b5db6ef975341b08223d
parentf4f42a6066e008d402a02ec7a1fbbd44c0ba829f
tg3: prevent scheduling while atomic splat

The problem was introduced in commit
f52013916f95 ("[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: f52013916f95 ("[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>
drivers/net/ethernet/broadcom/tg3.c