1
0
Fork 0
alistair23-linux/drivers/net/ethernet
Thomas Falcon 6c5c748908 ibmvnic: Convert reset work item mutex to spin lock
ibmvnic_reset can create and schedule a reset work item from
an IRQ context, so do not use a mutex, which can sleep. Convert
the reset work item mutex to a spin lock. Locking debugger generated
the trace output below.

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:908
in_atomic(): 1, irqs_disabled(): 1, pid: 120, name: kworker/8:1
4 locks held by kworker/8:1/120:
 #0: 0000000017c05720 ((wq_completion)"events"){+.+.}, at: process_one_work+0x188/0x710
 #1: 00000000ace90706 ((linkwatch_work).work){+.+.}, at: process_one_work+0x188/0x710
 #2: 000000007632871f (rtnl_mutex){+.+.}, at: rtnl_lock+0x30/0x50
 #3: 00000000fc36813a (&(&crq->lock)->rlock){..-.}, at: ibmvnic_tasklet+0x88/0x2010 [ibmvnic]
irq event stamp: 26293
hardirqs last  enabled at (26292): [<c000000000122468>] tasklet_action_common.isra.12+0x78/0x1c0
hardirqs last disabled at (26293): [<c000000000befce8>] _raw_spin_lock_irqsave+0x48/0xf0
softirqs last  enabled at (26288): [<c000000000a8ac78>] dev_deactivate_queue.constprop.28+0xc8/0x160
softirqs last disabled at (26289): [<c0000000000306e0>] call_do_softirq+0x14/0x24
CPU: 8 PID: 120 Comm: kworker/8:1 Kdump: loaded Not tainted 4.20.0-rc6 #6
Workqueue: events linkwatch_event
Call Trace:
[c0000003fffa7a50] [c000000000bc83e4] dump_stack+0xe8/0x164 (unreliable)
[c0000003fffa7aa0] [c00000000015ba0c] ___might_sleep+0x2dc/0x320
[c0000003fffa7b20] [c000000000be960c] __mutex_lock+0x8c/0xb40
[c0000003fffa7c30] [d000000006202ac8] ibmvnic_reset+0x78/0x330 [ibmvnic]
[c0000003fffa7cc0] [d0000000062097f4] ibmvnic_tasklet+0x1054/0x2010 [ibmvnic]
[c0000003fffa7e00] [c0000000001224c8] tasklet_action_common.isra.12+0xd8/0x1c0
[c0000003fffa7e60] [c000000000bf1238] __do_softirq+0x1a8/0x64c
[c0000003fffa7f90] [c0000000000306e0] call_do_softirq+0x14/0x24
[c0000003f3f87980] [c00000000001ba50] do_softirq_own_stack+0x60/0xb0
[c0000003f3f879c0] [c0000000001218a8] do_softirq+0xa8/0x100
[c0000003f3f879f0] [c000000000121a74] __local_bh_enable_ip+0x174/0x180
[c0000003f3f87a60] [c000000000bf003c] _raw_spin_unlock_bh+0x5c/0x80
[c0000003f3f87a90] [c000000000a8ac78] dev_deactivate_queue.constprop.28+0xc8/0x160
[c0000003f3f87ad0] [c000000000a8c8b0] dev_deactivate_many+0xd0/0x520
[c0000003f3f87b70] [c000000000a8cd40] dev_deactivate+0x40/0x60
[c0000003f3f87ba0] [c000000000a5e0c4] linkwatch_do_dev+0x74/0xd0
[c0000003f3f87bd0] [c000000000a5e694] __linkwatch_run_queue+0x1a4/0x1f0
[c0000003f3f87c30] [c000000000a5e728] linkwatch_event+0x48/0x60
[c0000003f3f87c50] [c0000000001444e8] process_one_work+0x238/0x710
[c0000003f3f87d20] [c000000000144a48] worker_thread+0x88/0x4e0
[c0000003f3f87db0] [c00000000014e3a8] kthread+0x178/0x1c0
[c0000003f3f87e20] [c00000000000bfd0] ret_from_kernel_thread+0x5c/0x6c

Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-12-10 17:34:25 -08:00
..
3com
8390 net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
adaptec
aeroflex net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
agere net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
alacritech net: ethernet: slicoss: remove duplicated include from slic.h 2018-09-18 19:57:40 -07:00
allwinner net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
alteon alteon: acenic: mark expected switch fall-through 2018-08-07 17:54:19 -07:00
altera net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
amazon net: ena: update driver version from 2.0.1 to 2.0.2 2018-11-19 15:13:00 -08:00
amd net: amd: add missing of_node_put() 2018-11-23 17:24:24 -08:00
apm net: ethernet: Add helper to determine if pause configuration is supported 2018-09-12 20:24:21 -07:00
apple net: apple: fix return type of ndo_start_xmit function 2018-09-21 19:15:15 -07:00
aquantia net: aquantia: fix rx checksum offload bits 2018-11-30 13:18:45 -08:00
arc
atheros net: alx: make alx_drv_name static 2018-11-05 17:12:58 -08:00
aurora net: ethernet: Add helper for set_pauseparam for Asym Pause 2018-09-12 20:24:21 -07:00
broadcom bnxt_en: Fix _bnxt_get_max_rings() for 57500 chips. 2018-12-09 11:46:58 -08:00
brocade bna: Remove unnecessary self assignment 2018-09-21 19:02:05 -07:00
cadence net: ethernet: cadence: fix socket buffer corruption problem 2018-10-25 11:32:24 -07:00
calxeda
cavium liquidio: read sc->iq_no before release sc 2018-11-30 17:20:39 -08:00
chelsio cxgb4: fix thermal zone build error 2018-11-15 09:49:07 -08:00
cirrus net: cirrus: fix return type of ndo_start_xmit function 2018-09-21 19:15:14 -07:00
cisco net: cisco: enic: Replace GFP_ATOMIC with GFP_KERNEL 2018-08-04 13:08:06 -07:00
cortina net: gemini: Fix copy/paste error 2018-11-23 22:35:38 -08:00
davicom net: ethernet: davicom: dm9000: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
dec net: tulip: de4x5: mark expected switch fall-throughs 2018-08-07 17:54:19 -07:00
dlink
emulex pci-v4.20-changes 2018-10-25 06:50:48 -07:00
ezchip
faraday net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts 2018-11-21 16:57:39 -08:00
freescale ethernet: fman: fix wrong of_node_put() in probe function 2018-12-04 20:42:35 -08:00
fujitsu
hisilicon net: hisilicon: remove unexpected free_netdev 2018-11-28 10:41:15 -08:00
hp net: hp100: fix always-true check for link up state 2018-09-17 07:55:19 -07:00
huawei hinic: Fix l4_type parameter in hinic_task_set_tunnel_l4 2018-10-29 20:43:40 -07:00
i825xx net: i825xx: fix return type of ndo_start_xmit function 2018-09-21 19:15:15 -07:00
ibm ibmvnic: Convert reset work item mutex to spin lock 2018-12-10 17:34:25 -08:00
intel i40e: fix kerneldoc for xsk methods 2018-11-28 08:45:00 -08:00
marvell net: mvpp2: fix phylink handling of invalid PHY modes 2018-12-04 21:17:15 -08:00
mediatek net: phy: Add helper for advertise to lcl value 2018-10-01 22:55:36 -07:00
mellanox net/mlx4_core: Correctly set PFC param if global pause is turned off. 2018-12-08 21:26:36 -08:00
micrel net: micrel: fix return type of ndo_start_xmit function 2018-09-21 19:11:39 -07:00
microchip lan743x: Enable driver to work with LAN7431 2018-11-27 16:32:07 -08:00
moxa
mscc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-19 11:03:06 -07:00
myricom drivers: net: remove <net/busy_poll.h> inclusion when not needed 2018-10-25 16:20:02 -07:00
natsemi
neterion net: neterion: vxge: Remove unnecessary parentheses 2018-09-21 19:00:09 -07:00
netronome nfp: flower: prevent offload if rhashtable insert fails 2018-11-30 13:24:56 -08:00
ni net: nixge: Address compiler warnings when building for i386 2018-10-01 22:48:08 -07:00
nuvoton
nvidia
nxp net: ethernet: lpc_eth: add device and device node local variables 2018-10-19 17:04:38 -07:00
oki-semi
packetengines
pasemi
qlogic qed: fix spelling mistake "attnetion" -> "attention" 2018-11-27 16:22:23 -08:00
qualcomm net: qualcomm: rmnet: Fix incorrect assignment of real_dev 2018-11-09 19:45:48 -08:00
rdc net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
realtek net: 8139cp: fix a BUG triggered by changing mtu with network traffic 2018-12-03 13:53:08 -08:00
renesas Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-09-25 10:35:29 -07:00
rocker rocker: Drop pointless static qualifier 2018-10-19 10:42:19 -07:00
samsung net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
seeq net: seeq: fix return type of ndo_start_xmit function 2018-09-21 19:15:14 -07:00
sfc pci-v4.20-changes 2018-10-25 06:50:48 -07:00
sgi net: sgi: fix return type of ndo_start_xmit function 2018-09-21 19:15:14 -07:00
silan
sis
smsc net: ethernet: smsc: smc91x: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
socionext net: ethernet: ave: Add MODULE_AUTHOR and MAINTAINERS entry 2018-11-29 10:38:39 -08:00
stmicro net: stmmac: Move debugfs init/exit to ->probe()/->remove() 2018-11-30 13:16:19 -08:00
sun net: sun: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00
synopsys
tehuti
ti net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode 2018-10-22 20:20:14 -07:00
toshiba net: toshiba: remove a redundant local variable 'index_specified' 2018-09-19 23:08:36 -07:00
tundra
via net: via: via-velocity: fix spelling mistake "alignement" -> "alignment" 2018-11-27 16:22:23 -08:00
wiznet net: ethernet: wiznet: w5300: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
xilinx net: xilinx: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00
xircom
xscale
Kconfig net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver 2018-09-13 08:14:33 -07:00
Makefile net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver 2018-09-13 08:14:33 -07:00
dnet.c net: ethernet: Add helper for MACs which support asym pause 2018-09-12 20:24:21 -07:00
dnet.h
ec_bhf.c
ethoc.c net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
fealnx.c
jme.c
jme.h
korina.c
lantiq_etop.c MIPS: lantiq: Do not enable IRQs in dma open 2018-09-13 08:14:33 -07:00
lantiq_xrx200.c net: lantiq: Fix returned value in case of error in 'xrx200_probe()' 2018-11-16 19:46:49 -08:00
netx-eth.c