mirror-linux/drivers/net/ethernet
Lorenzo Bianconi 65e6af6ceb net: ethernet: mtk_wed: fix sleep while atomic in mtk_wed_wo_queue_refill
In order to fix the following sleep while atomic bug always alloc pages
with GFP_ATOMIC in mtk_wed_wo_queue_refill since page_frag_alloc runs in
spin_lock critical section.

[    9.049719] Hardware name: MediaTek MT7986a RFB (DT)
[    9.054665] Call trace:
[    9.057096]  dump_backtrace+0x0/0x154
[    9.060751]  show_stack+0x14/0x1c
[    9.064052]  dump_stack_lvl+0x64/0x7c
[    9.067702]  dump_stack+0x14/0x2c
[    9.071001]  ___might_sleep+0xec/0x120
[    9.074736]  __might_sleep+0x4c/0x9c
[    9.078296]  __alloc_pages+0x184/0x2e4
[    9.082030]  page_frag_alloc_align+0x98/0x1ac
[    9.086369]  mtk_wed_wo_queue_refill+0x134/0x234
[    9.090974]  mtk_wed_wo_init+0x174/0x2c0
[    9.094881]  mtk_wed_attach+0x7c8/0x7e0
[    9.098701]  mt7915_mmio_wed_init+0x1f0/0x3a0 [mt7915e]
[    9.103940]  mt7915_pci_probe+0xec/0x3bc [mt7915e]
[    9.108727]  pci_device_probe+0xac/0x13c
[    9.112638]  really_probe.part.0+0x98/0x2f4
[    9.116807]  __driver_probe_device+0x94/0x13c
[    9.121147]  driver_probe_device+0x40/0x114
[    9.125314]  __driver_attach+0x7c/0x180
[    9.129133]  bus_for_each_dev+0x5c/0x90
[    9.132953]  driver_attach+0x20/0x2c
[    9.136513]  bus_add_driver+0x104/0x1fc
[    9.140333]  driver_register+0x74/0x120
[    9.144153]  __pci_register_driver+0x40/0x50
[    9.148407]  mt7915_init+0x5c/0x1000 [mt7915e]
[    9.152848]  do_one_initcall+0x40/0x25c
[    9.156669]  do_init_module+0x44/0x230
[    9.160403]  load_module+0x1f30/0x2750
[    9.164135]  __do_sys_init_module+0x150/0x200
[    9.168475]  __arm64_sys_init_module+0x18/0x20
[    9.172901]  invoke_syscall.constprop.0+0x4c/0xe0
[    9.177589]  do_el0_svc+0x48/0xe0
[    9.180889]  el0_svc+0x14/0x50
[    9.183929]  el0t_64_sync_handler+0x9c/0x120
[    9.188183]  el0t_64_sync+0x158/0x15c

Fixes: 799684448e ("net: ethernet: mtk_wed: introduce wed wo support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Link: https://lore.kernel.org/r/67ca94bdd3d9eaeb86e52b3050fbca0bcf7bb02f.1669908312.git.lorenzo@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-12-02 21:23:02 -08:00
..
3com
8390
actions
adaptec
adi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-03 13:21:54 -07:00
aeroflex
agere
alacritech net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers). 2022-10-28 20:13:54 -07:00
allwinner
alteon
altera Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
amazon Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-17 18:30:39 -08:00
amd ptp: xgbe: convert to .adjfine and adjust_by_scaled_ppm 2022-10-31 11:14:16 +00:00
apm drivers: net: xgene: disable napi when register irq failed in xgene_enet_open() 2022-11-08 15:15:55 +01:00
apple
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
arc
asix net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers). 2022-10-28 20:13:54 -07:00
atheros Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-17 18:30:39 -08:00
broadcom bnxt: report FEC block stats via standard interface 2022-12-01 16:34:52 -08:00
brocade bna: Avoid clashing function prototypes 2022-11-21 08:17:59 +00:00
cadence net: macb: implement live mac addr change 2022-11-07 18:26:23 -08:00
calxeda
cavium Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
chelsio ch_ktls: Use memcpy_from_page() instead of k[un]map_atomic() 2022-11-25 10:44:00 +00:00
cirrus
cisco enic: define constants for legacy interrupts offset 2022-10-18 19:34:28 -07:00
cortina net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers). 2022-10-28 20:13:54 -07:00
davicom net: dm9051: Fix missing dev_kfree_skb() in dm9051_loop_rx() 2022-11-23 12:43:14 +00:00
dec
dlink sundance: remove unused variable cnt 2022-11-17 13:18:30 +01:00
emulex net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers). 2022-10-28 20:13:54 -07:00
engleder tsnep: Rework RX buffer allocation 2022-12-02 10:47:49 +00:00
ezchip
faraday net: ftmac100: allow increasing MTU to make most use of single-segment buffers 2022-10-31 20:02:57 -07:00
freescale net: dpaa2-mac: move rtnl_lock() only around phylink_{,dis}connect_phy() 2022-12-01 13:40:22 +01:00
fujitsu
fungible net: devlink: clean-up empty devlink_ops::info_get() 2022-11-30 21:49:39 -08:00
google gve: Handle alternate miss completions 2022-11-21 10:52:14 +00:00
hisilicon net: devlink: let the core report the driver name instead of the drivers 2022-11-30 21:49:38 -08:00
huawei Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-17 18:30:39 -08:00
i825xx
ibm ibmvnic: Update XPS assignments during affinity binding 2022-11-14 10:47:07 +00:00
intel net: devlink: let the core report the driver name instead of the drivers 2022-11-30 21:49:38 -08:00
litex
marvell net: devlink: clean-up empty devlink_ops::info_get() 2022-11-30 21:49:39 -08:00
mediatek net: ethernet: mtk_wed: fix sleep while atomic in mtk_wed_wo_queue_refill 2022-12-02 21:23:02 -08:00
mellanox mlx5-updates-2022-11-29 2022-11-30 22:05:20 -08:00
micrel net: ksz884x: fix missing pci_disable_device() on error in pcidev_init() 2022-10-25 19:46:35 -07:00
microchip net: microchip: sparx5: Fix error handling in vcap_show_admin() 2022-12-01 12:12:23 +01:00
microsoft Merge branch 'mana-shared-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma 2022-11-10 12:07:19 -08:00
moxa
mscc net: mscc: ocelot: issue a warning if stats are incorrectly ordered 2022-11-22 15:36:44 +01:00
myricom
natsemi
neterion ethernet: s2io: disable napi when start nic failed in s2io_card_up() 2022-11-10 13:00:59 +01:00
netronome net: devlink: let the core report the driver name instead of the drivers 2022-11-30 21:49:38 -08:00
ni net: ethernet: nixge: fix NULL dereference 2022-11-28 11:09:51 +00:00
nvidia net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers). 2022-10-28 20:13:54 -07:00
nxp
oki-semi net: pch_gbe: fix pci device refcount leak while module exiting 2022-11-18 19:40:14 -08:00
packetengines
pasemi
pensando net: devlink: let the core report the driver name instead of the drivers 2022-11-30 21:49:38 -08:00
qlogic net: devlink: let the core report the driver name instead of the drivers 2022-11-30 21:49:38 -08:00
qualcomm net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers). 2022-10-28 20:13:54 -07:00
rdc
realtek r8169: use tp_to_dev instead of open code 2022-12-01 13:54:44 +01:00
renesas Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
rocker rocker: Explicitly mark learned FDB entries as offloaded 2022-11-02 20:45:23 -07:00
samsung
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
sgi
silan
sis
smsc net: remove smc911x driver 2022-10-18 19:33:51 -07:00
socionext net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers). 2022-10-28 20:13:54 -07:00
stmicro Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
sun sunvnet: Use kmap_local_page() instead of kmap_atomic() 2022-11-25 10:44:01 +00:00
sunplus eth: sp7021: drop free_netdev() from spl2sw_init_netdev() 2022-11-10 16:27:33 -08:00
synopsys
tehuti
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
toshiba
tundra ethernet: tundra: free irq when alloc ring failed in tsi108_open() 2022-11-10 15:39:08 +01:00
vertexcom
via net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers). 2022-10-28 20:13:54 -07:00
wangxun net: libwx: Fix dead code for duplicate check 2022-11-18 10:53:13 +00:00
wiznet
xilinx net: axienet: set mdio clock according to bus-frequency 2022-11-21 10:36:03 +00:00
xircom
xscale ptp_ixp46x: convert .adjfreq to .adjfine 2022-11-11 10:58:39 +00:00
Kconfig eth: fealnx: delete the driver for Myson MTD-800 2022-10-27 13:32:08 +02:00
Makefile eth: fealnx: delete the driver for Myson MTD-800 2022-10-27 13:32:08 +02:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c
jme.c
jme.h
korina.c
lantiq_etop.c net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY 2022-10-24 13:02:18 +01:00
lantiq_xrx200.c