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
..
2022-11-09 15:25:24 +01:00
2022-11-07 10:19:04 -08:00
2022-11-09 15:41:27 +01:00
2022-11-12 07:51:06 +09:00
2022-10-28 16:48:29 -07:00
2022-11-04 12:59:51 +02:00
2022-11-25 17:50:57 -08:00
2022-11-02 14:15:42 -07:00
2022-11-22 23:12:18 +01:00
2022-10-29 00:24:03 +02:00
2022-10-27 17:23:29 -07:00
2022-11-21 16:01:56 +01:00
2022-10-23 20:39:26 -04:00
2022-11-22 19:57:15 +01:00
2022-10-09 13:24:01 -07:00
2022-11-30 21:49:38 -08:00
2022-11-04 16:03:43 -07:00
2022-10-14 18:41:41 -07:00
2022-09-26 03:59:43 +09:00
2022-11-08 10:43:57 +05:30
2022-11-22 18:27:56 +05:30
2022-10-13 11:07:13 -07:00
2022-11-08 16:45:31 +01:00
2022-11-18 10:29:25 -08:00
2022-11-15 21:46:58 +08:00
2022-09-28 21:10:57 +09:30
2022-10-20 13:47:54 +02:00
2022-11-25 10:55:23 +10:00
2022-11-11 09:03:19 -08:00
2022-11-29 13:04:52 -08:00
2022-11-04 16:47:01 -07:00
2022-10-25 19:08:07 +02:00
2022-11-22 19:51:29 -08:00
2022-10-12 23:45:29 +02:00
2022-11-14 20:20:08 +00:00
2022-11-29 21:09:43 -08:00
2022-11-18 17:56:29 -08:00
2022-11-19 10:46:52 +01:00
2022-10-08 08:56:37 -07:00
2022-10-12 10:23:24 -07:00
2022-11-14 10:43:13 +00:00
2022-10-24 11:32:10 +02:00
2022-10-09 14:05:15 -07:00
2022-10-05 21:51:58 -05:00
2022-11-18 13:59:45 -08:00
2022-10-25 16:43:34 +01:00
2022-10-23 12:04:56 -07:00
2022-11-09 15:40:03 +01:00
2022-11-16 17:00:39 +01:00
2022-11-07 16:53:04 +01:00
2022-12-02 21:23:02 -08:00
2022-11-29 13:04:52 -08:00
2022-10-14 18:41:41 -07:00
2022-11-18 13:59:45 -08:00
2022-11-22 18:22:05 +01:00
2022-11-22 17:22:52 -06:00
2022-10-27 09:12:05 +02:00
2022-11-09 15:40:32 +01:00
2022-11-12 12:43:59 +00:00
2022-09-27 08:12:16 +02:00
2022-10-14 12:38:03 -07:00
2022-11-05 13:01:25 +05:30
2022-11-15 09:13:59 +01:00
2022-11-16 10:36:13 -08:00
2022-10-10 18:11:11 +02:00
2022-11-01 01:00:32 +01:00
2022-10-10 09:10:28 -07:00
2022-11-30 21:49:38 -08:00
2022-10-07 11:32:10 -07:00
2022-11-25 13:54:48 -08:00
2022-10-05 09:20:44 -06:00
2022-10-08 10:06:48 -07:00
2022-10-18 22:36:54 +02:00
2022-11-29 13:04:52 -08:00
2022-11-25 12:32:42 -08:00
2022-11-09 15:40:14 +01:00
2022-11-10 18:45:40 +01:00
2022-11-14 15:52:53 +08:00
2022-10-28 17:00:38 +05:30
2022-11-23 11:19:06 -08:00
2022-09-30 14:33:23 +02:00
2022-11-29 13:04:52 -08:00
2022-11-17 17:46:16 +00:00
2022-11-17 09:22:12 +01:00
2022-10-15 19:33:57 +02:00
2022-10-11 17:42:58 -06:00
2022-11-18 10:59:52 -08:00
2022-10-22 03:29:32 +00:00
2022-11-22 16:52:05 +01:00
2022-10-10 14:02:53 -07:00
2022-11-10 12:03:36 -07:00
2022-10-10 14:02:53 -07:00
2022-11-25 09:21:11 +10:00
2022-11-21 11:03:40 +01:00
2022-10-13 09:33:03 -04:00
2022-10-08 08:56:37 -07:00
2022-11-01 12:21:53 -07:00
2022-11-16 10:49:06 -08:00