linux_dsm_epyc7002/drivers/net/ethernet
Moni Shoua 33814e5d12 net/mlx5: Take lock with IRQs disabled to avoid deadlock
The lock in qp_table might be taken from process context or from
interrupt context. This may lead to a deadlock unless it is taken with
IRQs disabled.

Discovered by lockdep

================================
WARNING: inconsistent lock state
4.20.0-rc6
--------------------------------
inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W}

python/12572 [HC1[1]:SC0[0]:HE0:SE1] takes:
00000000052a4df4 (&(&table->lock)->rlock#2){?.+.}, /0x50 [mlx5_core]
{HARDIRQ-ON-W} state was registered at:
  _raw_spin_lock+0x33/0x70
  mlx5_get_rsc+0x1a/0x50 [mlx5_core]
  mlx5_ib_eqe_pf_action+0x493/0x1be0 [mlx5_ib]
  process_one_work+0x90c/0x1820
  worker_thread+0x87/0xbb0
  kthread+0x320/0x3e0
  ret_from_fork+0x24/0x30
irq event stamp: 103928
hardirqs last  enabled at (103927): [] nk+0x1a/0x1c
hardirqs last disabled at (103928): [] unk+0x1a/0x1c
softirqs last  enabled at (103924): [] tcp_sendmsg+0x31/0x40
softirqs last disabled at (103922): [] 80

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&(&table->lock)->rlock#2);

    lock(&(&table->lock)->rlock#2);

 *** DEADLOCK ***

Fixes: 032080ab43 ("IB/mlx5: Lock QP during page fault handling")
Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2019-01-25 12:00:28 -08:00
..
3com net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
8390
adaptec
aeroflex cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
agere
alacritech cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
allwinner
alteon
altera
amazon cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
amd amd-xgbe: Fix mdio access for non-zero ports and clause 45 PHYs 2019-01-17 22:06:54 -08:00
apm cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
apple
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-09 21:43:31 -08:00
arc
atheros cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
aurora
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-16 05:13:36 +12:00
brocade
cadence net: macb: remove unnecessary code 2019-01-04 12:59:09 -08:00
calxeda
cavium cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
chelsio Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-16 05:13:36 +12:00
cirrus net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
cisco net: core: dev: Add extack argument to dev_open() 2018-12-06 13:26:06 -08:00
cortina net: gemini: Fix copy/paste error 2018-11-23 22:35:38 -08:00
davicom
dec net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
dlink net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
emulex cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
ezchip
faraday cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
freescale dpaa_eth: NETIF_F_LLTX requires to do our own update of trans_start 2019-01-17 22:00:00 -08:00
fujitsu
hisilicon Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-16 05:13:36 +12:00
hp
huawei cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
i825xx
ibm cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
intel Revert "igb: reduce CPU0 latency when updating statistics" 2019-01-15 13:33:44 -08:00
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-16 05:13:36 +12:00
mediatek Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-16 05:13:36 +12:00
mellanox net/mlx5: Take lock with IRQs disabled to avoid deadlock 2019-01-25 12:00:28 -08:00
micrel
microchip lan743x: Remove phy_read from link status change function 2019-01-08 16:26:12 -05:00
moxa
mscc USB/PHY patches for 4.21-rc1 2018-12-28 20:30:00 -08:00
myricom cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
natsemi
neterion Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-12-20 11:53:36 -08:00
netronome cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
ni cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
nuvoton w90p910_ether: remove incorrect __init annotation 2018-12-14 14:42:51 -08:00
nvidia
nxp net: lpc_eth: fix trivial comment typo 2018-11-21 16:17:32 -08:00
oki-semi cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
packetengines
pasemi cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
qlogic Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-16 05:13:36 +12:00
qualcomm cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
rdc
realtek r8169: load Realtek PHY driver module before r8169 2019-01-08 16:40:00 -05:00
renesas ravb: Clean up duplex handling 2018-11-23 11:14:47 -08:00
rocker rocker, dsa, ethsw: Don't filter VLAN events on bridge itself 2018-11-23 18:02:24 -08:00
samsung cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
seeq
sfc cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
sgi cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
silan
sis ethernet/sis: Replace synchronize_sched() with synchronize_rcu() 2018-11-27 09:21:36 -08:00
smsc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-12-27 13:04:52 -08:00
socionext cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
stmicro Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-16 05:13:36 +12:00
sun niu: fix missing checks of niu_pci_eeprom_read 2018-12-27 16:19:27 -08:00
synopsys
tehuti
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-03 12:53:47 -08:00
toshiba
tundra cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
via net: via: via-velocity: fix spelling mistake "alignement" -> "alignment" 2018-11-27 16:22:23 -08:00
wiznet
xilinx cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c net: lantiq: Fix returned value in case of error in 'xrx200_probe()' 2018-11-16 19:46:49 -08:00
Makefile
netx-eth.c