===================================================== WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected 5.15.126-syzkaller-00092-g24c4de4069cb #0 Not tainted ----------------------------------------------------- syz-executor567/3963 [HC0[0]:SC0[2]:HE1:SE0] is trying to acquire: ffff800014b85980 (fs_reclaim){+.+.}-{0:0}, at: might_alloc include/linux/sched/mm.h:206 [inline] ffff800014b85980 (fs_reclaim){+.+.}-{0:0}, at: slab_pre_alloc_hook+0x38/0xe8 mm/slab.h:492 and this task is already holding: ffff800016a26e08 (noop_qdisc.q.lock){+.-.}-{2:2}, at: netem_change+0x22c/0x1a90 net/sched/sch_netem.c:972 which would create a new lock dependency: (noop_qdisc.q.lock){+.-.}-{2:2} -> (fs_reclaim){+.+.}-{0:0} but this new dependency connects a SOFTIRQ-irq-safe lock: (noop_qdisc.q.lock){+.-.}-{2:2} ... which became SOFTIRQ-irq-safe at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5622 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] net_tx_action+0x634/0x884 net/core/dev.c:5049 __do_softirq+0x344/0xe20 kernel/softirq.c:558 run_ksoftirqd+0x68/0x258 kernel/softirq.c:920 smpboot_thread_fn+0x4b0/0x920 kernel/smpboot.c:164 kthread+0x37c/0x45c kernel/kthread.c:319 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 to a SOFTIRQ-irq-unsafe lock: (fs_reclaim){+.+.}-{0:0} ... which became SOFTIRQ-irq-unsafe at: ... lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5622 __fs_reclaim_acquire mm/page_alloc.c:4547 [inline] fs_reclaim_acquire+0xf0/0x1d0 mm/page_alloc.c:4561 might_alloc include/linux/sched/mm.h:206 [inline] slab_pre_alloc_hook+0x38/0xe8 mm/slab.h:492 slab_alloc_node mm/slub.c:3134 [inline] kmem_cache_alloc_node_trace+0xa0/0x4c4 mm/slub.c:3270 kmalloc_node include/linux/slab.h:609 [inline] kzalloc_node include/linux/slab.h:732 [inline] alloc_worker kernel/workqueue.c:1861 [inline] init_rescuer+0xa4/0x264 kernel/workqueue.c:4279 workqueue_init+0x2b4/0x640 kernel/workqueue.c:6136 kernel_init_freeable+0x448/0x650 init/main.c:1592 kernel_init+0x24/0x294 init/main.c:1499 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); local_irq_disable(); lock(noop_qdisc.q.lock); lock(fs_reclaim); lock(noop_qdisc.q.lock); *** DEADLOCK *** 2 locks held by syz-executor567/3963: #0: ffff8000169e74a8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline] #0: ffff8000169e74a8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0xa2c/0xdac net/core/rtnetlink.c:5600 #1: ffff800016a26e08 (noop_qdisc.q.lock){+.-.}-{2:2}, at: netem_change+0x22c/0x1a90 net/sched/sch_netem.c:972 the dependencies between SOFTIRQ-irq-safe lock and the holding lock: -> (noop_qdisc.q.lock){+.-.}-{2:2} { HARDIRQ-ON-W at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5622 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] __dev_xmit_skb net/core/dev.c:3848 [inline] __dev_queue_xmit+0x8d0/0x2a6c net/core/dev.c:4190 dev_queue_xmit+0x24/0x34 net/core/dev.c:4258 tx+0x8c/0x130 drivers/block/aoe/aoenet.c:63 kthread+0x1ac/0x374 drivers/block/aoe/aoecmd.c:1230 kthread+0x37c/0x45c kernel/kthread.c:319 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 IN-SOFTIRQ-W at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5622 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] net_tx_action+0x634/0x884 net/core/dev.c:5049 __do_softirq+0x344/0xe20 kernel/softirq.c:558 run_ksoftirqd+0x68/0x258 kernel/softirq.c:920 smpboot_thread_fn+0x4b0/0x920 kernel/smpboot.c:164 kthread+0x37c/0x45c kernel/kthread.c:319 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 INITIAL USE at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5622 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] __dev_xmit_skb net/core/dev.c:3848 [inline] __dev_queue_xmit+0x8d0/0x2a6c net/core/dev.c:4190 dev_queue_xmit+0x24/0x34 net/core/dev.c:4258 tx+0x8c/0x130 drivers/block/aoe/aoenet.c:63 kthread+0x1ac/0x374 drivers/block/aoe/aoecmd.c:1230 kthread+0x37c/0x45c kernel/kthread.c:319 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 } ... key at: [] noop_qdisc+0x108/0x320 the dependencies between the lock to be acquired and SOFTIRQ-irq-unsafe lock: -> (fs_reclaim){+.+.}-{0:0} { HARDIRQ-ON-W at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5622 __fs_reclaim_acquire mm/page_alloc.c:4547 [inline] fs_reclaim_acquire+0xf0/0x1d0 mm/page_alloc.c:4561 might_alloc include/linux/sched/mm.h:206 [inline] slab_pre_alloc_hook+0x38/0xe8 mm/slab.h:492 slab_alloc_node mm/slub.c:3134 [inline] kmem_cache_alloc_node_trace+0xa0/0x4c4 mm/slub.c:3270 kmalloc_node include/linux/slab.h:609 [inline] kzalloc_node include/linux/slab.h:732 [inline] alloc_worker kernel/workqueue.c:1861 [inline] init_rescuer+0xa4/0x264 kernel/workqueue.c:4279 workqueue_init+0x2b4/0x640 kernel/workqueue.c:6136 kernel_init_freeable+0x448/0x650 init/main.c:1592 kernel_init+0x24/0x294 init/main.c:1499 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 SOFTIRQ-ON-W at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5622 __fs_reclaim_acquire mm/page_alloc.c:4547 [inline] fs_reclaim_acquire+0xf0/0x1d0 mm/page_alloc.c:4561 might_alloc include/linux/sched/mm.h:206 [inline] slab_pre_alloc_hook+0x38/0xe8 mm/slab.h:492 slab_alloc_node mm/slub.c:3134 [inline] kmem_cache_alloc_node_trace+0xa0/0x4c4 mm/slub.c:3270 kmalloc_node include/linux/slab.h:609 [inline] kzalloc_node include/linux/slab.h:732 [inline] alloc_worker kernel/workqueue.c:1861 [inline] init_rescuer+0xa4/0x264 kernel/workqueue.c:4279 workqueue_init+0x2b4/0x640 kernel/workqueue.c:6136 kernel_init_freeable+0x448/0x650 init/main.c:1592 kernel_init+0x24/0x294 init/main.c:1499 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 INITIAL USE at: lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5622 __fs_reclaim_acquire mm/page_alloc.c:4547 [inline] fs_reclaim_acquire+0xf0/0x1d0 mm/page_alloc.c:4561 might_alloc include/linux/sched/mm.h:206 [inline] slab_pre_alloc_hook+0x38/0xe8 mm/slab.h:492 slab_alloc_node mm/slub.c:3134 [inline] kmem_cache_alloc_node_trace+0xa0/0x4c4 mm/slub.c:3270 kmalloc_node include/linux/slab.h:609 [inline] kzalloc_node include/linux/slab.h:732 [inline] alloc_worker kernel/workqueue.c:1861 [inline] init_rescuer+0xa4/0x264 kernel/workqueue.c:4279 workqueue_init+0x2b4/0x640 kernel/workqueue.c:6136 kernel_init_freeable+0x448/0x650 init/main.c:1592 kernel_init+0x24/0x294 init/main.c:1499 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 } ... key at: [] __fs_reclaim_map+0x0/0x200 ... acquired at: __fs_reclaim_acquire mm/page_alloc.c:4547 [inline] fs_reclaim_acquire+0xf0/0x1d0 mm/page_alloc.c:4561 might_alloc include/linux/sched/mm.h:206 [inline] slab_pre_alloc_hook+0x38/0xe8 mm/slab.h:492 slab_alloc_node mm/slub.c:3134 [inline] __kmalloc_node+0xbc/0x5b8 mm/slub.c:4451 kmalloc_node include/linux/slab.h:614 [inline] kvmalloc_node+0x88/0x204 mm/util.c:619 kvmalloc include/linux/mm.h:805 [inline] get_dist_table+0x9c/0x2a4 net/sched/sch_netem.c:788 netem_change+0x7cc/0x1a90 net/sched/sch_netem.c:988 netem_init+0x54/0xb8 net/sched/sch_netem.c:1075 qdisc_create+0x6fc/0xf44 net/sched/sch_api.c:1264 tc_modify_qdisc+0x8dc/0x1344 rtnetlink_rcv_msg+0xa74/0xdac net/core/rtnetlink.c:5603 netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2505 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:5621 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1924 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg net/socket.c:724 [inline] ____sys_sendmsg+0x584/0x870 net/socket.c:2412 ___sys_sendmsg+0x214/0x294 net/socket.c:2466 __sys_sendmsg net/socket.c:2495 [inline] __do_sys_sendmsg net/socket.c:2504 [inline] __se_sys_sendmsg net/socket.c:2502 [inline] __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2502 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 stack backtrace: CPU: 1 PID: 3963 Comm: syz-executor567 Not tainted 5.15.126-syzkaller-00092-g24c4de4069cb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 __lock_acquire+0x62b4/0x7620 kernel/locking/lockdep.c:5011 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5622 __fs_reclaim_acquire mm/page_alloc.c:4547 [inline] fs_reclaim_acquire+0xf0/0x1d0 mm/page_alloc.c:4561 might_alloc include/linux/sched/mm.h:206 [inline] slab_pre_alloc_hook+0x38/0xe8 mm/slab.h:492 slab_alloc_node mm/slub.c:3134 [inline] __kmalloc_node+0xbc/0x5b8 mm/slub.c:4451 kmalloc_node include/linux/slab.h:614 [inline] kvmalloc_node+0x88/0x204 mm/util.c:619 kvmalloc include/linux/mm.h:805 [inline] get_dist_table+0x9c/0x2a4 net/sched/sch_netem.c:788 netem_change+0x7cc/0x1a90 net/sched/sch_netem.c:988 netem_init+0x54/0xb8 net/sched/sch_netem.c:1075 qdisc_create+0x6fc/0xf44 net/sched/sch_api.c:1264 tc_modify_qdisc+0x8dc/0x1344 rtnetlink_rcv_msg+0xa74/0xdac net/core/rtnetlink.c:5603 netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2505 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:5621 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1924 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg net/socket.c:724 [inline] ____sys_sendmsg+0x584/0x870 net/socket.c:2412 ___sys_sendmsg+0x214/0x294 net/socket.c:2466 __sys_sendmsg net/socket.c:2495 [inline] __do_sys_sendmsg net/socket.c:2504 [inline] __se_sys_sendmsg net/socket.c:2502 [inline] __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2502 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 BUG: sleeping function called from invalid context at include/linux/sched/mm.h:209 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 3963, name: syz-executor567 INFO: lockdep is turned off. Preemption disabled at: [] netem_change+0x22c/0x1a90 net/sched/sch_netem.c:972 CPU: 1 PID: 3963 Comm: syz-executor567 Not tainted 5.15.126-syzkaller-00092-g24c4de4069cb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 ___might_sleep+0x380/0x4dc kernel/sched/core.c:9625 __might_sleep+0x98/0xf0 kernel/sched/core.c:9579 might_alloc include/linux/sched/mm.h:209 [inline] slab_pre_alloc_hook+0x58/0xe8 mm/slab.h:492 slab_alloc_node mm/slub.c:3134 [inline] __kmalloc_node+0xbc/0x5b8 mm/slub.c:4451 kmalloc_node include/linux/slab.h:614 [inline] kvmalloc_node+0x88/0x204 mm/util.c:619 kvmalloc include/linux/mm.h:805 [inline] get_dist_table+0x9c/0x2a4 net/sched/sch_netem.c:788 netem_change+0x7cc/0x1a90 net/sched/sch_netem.c:988 netem_init+0x54/0xb8 net/sched/sch_netem.c:1075 qdisc_create+0x6fc/0xf44 net/sched/sch_api.c:1264 tc_modify_qdisc+0x8dc/0x1344 rtnetlink_rcv_msg+0xa74/0xdac net/core/rtnetlink.c:5603 netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2505 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:5621 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1924 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg net/socket.c:724 [inline] ____sys_sendmsg+0x584/0x870 net/socket.c:2412 ___sys_sendmsg+0x214/0x294 net/socket.c:2466 __sys_sendmsg net/socket.c:2495 [inline] __do_sys_sendmsg net/socket.c:2504 [inline] __se_sys_sendmsg net/socket.c:2502 [inline] __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2502 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584