linux-brain/drivers/net/ethernet/qlogic/qed
Jia He bf692e7ef6 qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()
[ Upstream commit 6206b7981a36476f4695d661ae139f7db36a802d ]

Liajian reported a bug_on hit on a ThunderX2 arm64 server with FastLinQ
QL41000 ethernet controller:
 BUG: scheduling while atomic: kworker/0:4/531/0x00000200
  [qed_probe:488()]hw prepare failed
  kernel BUG at mm/vmalloc.c:2355!
  Internal error: Oops - BUG: 0 [#1] SMP
  CPU: 0 PID: 531 Comm: kworker/0:4 Tainted: G W 5.4.0-77-generic #86-Ubuntu
  pstate: 00400009 (nzcv daif +PAN -UAO)
 Call trace:
  vunmap+0x4c/0x50
  iounmap+0x48/0x58
  qed_free_pci+0x60/0x80 [qed]
  qed_probe+0x35c/0x688 [qed]
  __qede_probe+0x88/0x5c8 [qede]
  qede_probe+0x60/0xe0 [qede]
  local_pci_probe+0x48/0xa0
  work_for_cpu_fn+0x24/0x38
  process_one_work+0x1d0/0x468
  worker_thread+0x238/0x4e0
  kthread+0xf0/0x118
  ret_from_fork+0x10/0x18

In this case, qed_hw_prepare() returns error due to hw/fw error, but in
theory work queue should be in process context instead of interrupt.

The root cause might be the unpaired spin_{un}lock_bh() in
_qed_mcp_cmd_and_union(), which causes botton half is disabled incorrectly.

Reported-by: Lijian Zhang <Lijian.Zhang@arm.com>
Signed-off-by: Jia He <justin.he@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-08-08 09:04:07 +02:00
..
Makefile
qed.h
qed_cxt.c qed: suppress "don't support RoCE & iWARP" flooding on HW init 2020-07-29 10:18:33 +02:00
qed_cxt.h
qed_dcbx.c net: qed: Fix memcpy() overflow of qed_dcbx_params() 2021-06-30 08:47:49 -04:00
qed_dcbx.h
qed_debug.c qed: Populate nvm-file attributes while reading nvm config partition. 2020-07-16 08:16:40 +02:00
qed_debug.h
qed_dev.c net: qed: Disable aRFS for NPAR and 100G 2020-10-01 13:18:18 +02:00
qed_dev_api.h
qed_fcoe.c
qed_fcoe.h
qed_hsi.h
qed_hw.c
qed_hw.h
qed_init_fw_funcs.c
qed_init_ops.c
qed_init_ops.h
qed_int.c qed: Disable "MFW indication via attention" SPAM every 5 minutes 2020-08-05 09:59:50 +02:00
qed_int.h qed: suppress false-positives interrupt error messages on HW init 2020-07-29 10:18:34 +02:00
qed_iscsi.c
qed_iscsi.h
qed_iwarp.c qed: fix error return code in qed_iwarp_ll2_start() 2020-11-24 13:28:59 +01:00
qed_iwarp.h
qed_l2.c net: qed: Disable aRFS for NPAR and 100G 2020-10-01 13:18:18 +02:00
qed_l2.h
qed_ll2.c
qed_ll2.h
qed_main.c net: qed: Disable aRFS for NPAR and 100G 2020-10-01 13:18:18 +02:00
qed_mcp.c qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union() 2021-08-08 09:04:07 +02:00
qed_mcp.h qed: Populate nvm-file attributes while reading nvm config partition. 2020-07-16 08:16:40 +02:00
qed_mng_tlv.c
qed_ooo.c
qed_ooo.h
qed_ptp.c
qed_rdma.c
qed_rdma.h
qed_reg_addr.h
qed_roce.c net: qed: fix async event callbacks unregistering 2020-06-30 15:36:58 -04:00
qed_roce.h
qed_selftest.c
qed_selftest.h
qed_sp.h
qed_sp_commands.c
qed_spq.c
qed_sriov.c net: qed: RDMA personality shouldn't fail VF load 2020-10-01 13:18:18 +02:00
qed_sriov.h
qed_vf.c net: qed: fix NVMe login fails over VFs 2020-06-30 15:36:59 -04:00
qed_vf.h