linux-stable/drivers/net
Jia He 6a6047bf89 qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()
[ Upstream commit 6206b7981a ]

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 08:54:29 +02:00
..
appletalk net: appletalk: cops: Fix data race in cops_probe1 2021-06-16 11:54:58 +02:00
arcnet
bonding bonding: init notify_work earlier to avoid uninitialized use 2021-06-16 11:54:57 +02:00
caif net: caif: fix memory leak in ldisc_open 2021-06-30 08:48:31 -04:00
can can: hi311x: fix a signedness bug in hi3110_cmd() 2021-08-04 12:23:46 +02:00
dsa net: dsa: mv88e6xxx: use correct .stats_set_histogram() on Topaz 2021-07-28 11:13:51 +02:00
ethernet qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union() 2021-08-08 08:54:29 +02:00
fddi FDDI: defxx: Make MMIO the configuration default except for EISA 2021-05-22 10:59:47 +02:00
fjes fjes: check return value after calling platform_get_resource() 2021-07-20 16:16:00 +02:00
hamradio net: hamradio: fix memory leak in mkiss_close 2021-06-30 08:48:20 -04:00
hippi
hyperv
ieee802154 ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl() 2021-07-20 16:15:51 +02:00
ipvlan
netdevsim
phy net: mdiobus: get rid of a BUG_ON() 2021-06-16 11:54:57 +02:00
plip
ppp
slip
team team: protect features update by RCU to avoid deadlock 2021-02-03 23:23:27 +01:00
usb r8152: Fix potential PM refcount imbalance 2021-08-08 08:54:29 +02:00
vmxnet3
wan net: lapbether: Prevent racing when checking whether the netif is running 2021-05-22 10:59:34 +02:00
wimax staging: wimax/i2400m: fix byte-order issue 2021-05-22 10:59:14 +02:00
wireless iwlwifi: pcie: free IML DMA memory allocation 2021-07-20 16:16:02 +02:00
xen-netback xen-netback: Check for hotplug-status existence before watching 2021-04-28 13:16:52 +02:00
dummy.c
eql.c
geneve.c net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb 2021-05-22 10:59:38 +02:00
gtp.c net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-03-04 09:39:59 +01:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c net: tun: set tun->dev->addr_len during TUNSETLINK processing 2021-04-14 08:22:36 +02:00
veth.c veth: Store queue_mapping independently of XDP prog presence 2021-03-30 14:37:00 +02:00
virtio_net.c virtio_net: Do not pull payload in skb->head 2021-08-04 12:23:44 +02:00
vrf.c vrf: Fix fast path output packet handling with async Netfilter rules 2020-11-18 19:18:52 +01:00
vsockmon.c
vxlan.c vxlan: add missing rcu_read_lock() in neigh_reduce() 2021-07-20 16:15:51 +02:00
xen-netfront.c