===================================================== WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected 6.1.45-syzkaller #0 Not tainted ----------------------------------------------------- syz-executor341/3512 [HC0[0]:SC0[2]:HE1:SE0] is trying to acquire: ffffffff8d203400 (fs_reclaim){+.+.}-{0:0}, at: might_alloc include/linux/sched/mm.h:271 [inline] ffffffff8d203400 (fs_reclaim){+.+.}-{0:0}, at: slab_pre_alloc_hook+0x2a/0x2a0 mm/slab.h:710 and this task is already holding: ffffffff8e2df488 (noop_qdisc.q.lock){+.-.}-{2:2}, at: netem_change+0x17e/0x1ea0 net/sched/sch_netem.c:969 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+0x1f8/0x5a0 kernel/locking/lockdep.c:5669 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:350 [inline] net_tx_action+0x752/0x970 net/core/dev.c:5077 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 do_softirq+0x162/0x240 kernel/softirq.c:472 __local_bh_enable_ip+0x1b1/0x1f0 kernel/softirq.c:396 netif_tx_unlock_bh include/linux/netdevice.h:4396 [inline] dev_watchdog_down net/sched/sch_generic.c:566 [inline] dev_deactivate_many+0x3b4/0xaf0 net/sched/sch_generic.c:1348 dev_deactivate+0x177/0x270 net/sched/sch_generic.c:1382 linkwatch_do_dev+0x104/0x160 net/core/link_watch.c:166 __linkwatch_run_queue+0x448/0x6b0 net/core/link_watch.c:221 linkwatch_event+0x48/0x50 net/core/link_watch.c:264 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2292 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2439 kthread+0x26e/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 to a SOFTIRQ-irq-unsafe lock: (fs_reclaim){+.+.}-{0:0} ... which became SOFTIRQ-irq-unsafe at: ... lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669 __fs_reclaim_acquire mm/page_alloc.c:4683 [inline] fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4697 might_alloc include/linux/sched/mm.h:271 [inline] slab_pre_alloc_hook+0x2a/0x2a0 mm/slab.h:710 slab_alloc_node mm/slub.c:3318 [inline] __kmem_cache_alloc_node+0x47/0x260 mm/slub.c:3437 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1045 kmalloc include/linux/slab.h:553 [inline] kzalloc include/linux/slab.h:689 [inline] alloc_workqueue_attrs+0x46/0xc0 kernel/workqueue.c:3397 wq_numa_init+0x122/0x4b0 kernel/workqueue.c:5962 workqueue_init+0x22/0x59d kernel/workqueue.c:6089 kernel_init_freeable+0x40a/0x61f init/main.c:1603 kernel_init+0x19/0x290 init/main.c:1508 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 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-executor341/3512: #0: ffffffff8e2988e8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline] #0: ffffffff8e2988e8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x720/0xf00 net/core/rtnetlink.c:6104 #1: ffffffff8e2df488 (noop_qdisc.q.lock){+.-.}-{2:2}, at: netem_change+0x17e/0x1ea0 net/sched/sch_netem.c:969 the dependencies between SOFTIRQ-irq-safe lock and the holding lock: -> (noop_qdisc.q.lock){+.-.}-{2:2} { HARDIRQ-ON-W at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:350 [inline] __dev_xmit_skb net/core/dev.c:3854 [inline] __dev_queue_xmit+0xd50/0x3c90 net/core/dev.c:4227 dev_queue_xmit include/linux/netdevice.h:3021 [inline] tx+0x66/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x234/0x440 drivers/block/aoe/aoecmd.c:1229 kthread+0x26e/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 IN-SOFTIRQ-W at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:350 [inline] net_tx_action+0x752/0x970 net/core/dev.c:5077 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 do_softirq+0x162/0x240 kernel/softirq.c:472 __local_bh_enable_ip+0x1b1/0x1f0 kernel/softirq.c:396 netif_tx_unlock_bh include/linux/netdevice.h:4396 [inline] dev_watchdog_down net/sched/sch_generic.c:566 [inline] dev_deactivate_many+0x3b4/0xaf0 net/sched/sch_generic.c:1348 dev_deactivate+0x177/0x270 net/sched/sch_generic.c:1382 linkwatch_do_dev+0x104/0x160 net/core/link_watch.c:166 __linkwatch_run_queue+0x448/0x6b0 net/core/link_watch.c:221 linkwatch_event+0x48/0x50 net/core/link_watch.c:264 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2292 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2439 kthread+0x26e/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 INITIAL USE at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:350 [inline] __dev_xmit_skb net/core/dev.c:3854 [inline] __dev_queue_xmit+0xd50/0x3c90 net/core/dev.c:4227 dev_queue_xmit include/linux/netdevice.h:3021 [inline] tx+0x66/0x100 drivers/block/aoe/aoenet.c:63 kthread+0x234/0x440 drivers/block/aoe/aoecmd.c:1229 kthread+0x26e/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 } ... 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+0x1f8/0x5a0 kernel/locking/lockdep.c:5669 __fs_reclaim_acquire mm/page_alloc.c:4683 [inline] fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4697 might_alloc include/linux/sched/mm.h:271 [inline] slab_pre_alloc_hook+0x2a/0x2a0 mm/slab.h:710 slab_alloc_node mm/slub.c:3318 [inline] __kmem_cache_alloc_node+0x47/0x260 mm/slub.c:3437 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1045 kmalloc include/linux/slab.h:553 [inline] kzalloc include/linux/slab.h:689 [inline] alloc_workqueue_attrs+0x46/0xc0 kernel/workqueue.c:3397 wq_numa_init+0x122/0x4b0 kernel/workqueue.c:5962 workqueue_init+0x22/0x59d kernel/workqueue.c:6089 kernel_init_freeable+0x40a/0x61f init/main.c:1603 kernel_init+0x19/0x290 init/main.c:1508 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 SOFTIRQ-ON-W at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669 __fs_reclaim_acquire mm/page_alloc.c:4683 [inline] fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4697 might_alloc include/linux/sched/mm.h:271 [inline] slab_pre_alloc_hook+0x2a/0x2a0 mm/slab.h:710 slab_alloc_node mm/slub.c:3318 [inline] __kmem_cache_alloc_node+0x47/0x260 mm/slub.c:3437 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1045 kmalloc include/linux/slab.h:553 [inline] kzalloc include/linux/slab.h:689 [inline] alloc_workqueue_attrs+0x46/0xc0 kernel/workqueue.c:3397 wq_numa_init+0x122/0x4b0 kernel/workqueue.c:5962 workqueue_init+0x22/0x59d kernel/workqueue.c:6089 kernel_init_freeable+0x40a/0x61f init/main.c:1603 kernel_init+0x19/0x290 init/main.c:1508 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 INITIAL USE at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669 __fs_reclaim_acquire mm/page_alloc.c:4683 [inline] fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4697 might_alloc include/linux/sched/mm.h:271 [inline] slab_pre_alloc_hook+0x2a/0x2a0 mm/slab.h:710 slab_alloc_node mm/slub.c:3318 [inline] __kmem_cache_alloc_node+0x47/0x260 mm/slub.c:3437 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1045 kmalloc include/linux/slab.h:553 [inline] kzalloc include/linux/slab.h:689 [inline] alloc_workqueue_attrs+0x46/0xc0 kernel/workqueue.c:3397 wq_numa_init+0x122/0x4b0 kernel/workqueue.c:5962 workqueue_init+0x22/0x59d kernel/workqueue.c:6089 kernel_init_freeable+0x40a/0x61f init/main.c:1603 kernel_init+0x19/0x290 init/main.c:1508 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 } ... key at: [] __fs_reclaim_map+0x0/0xe0 ... acquired at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669 __fs_reclaim_acquire mm/page_alloc.c:4683 [inline] fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4697 might_alloc include/linux/sched/mm.h:271 [inline] slab_pre_alloc_hook+0x2a/0x2a0 mm/slab.h:710 slab_alloc_node mm/slub.c:3318 [inline] __kmem_cache_alloc_node+0x47/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node+0xa2/0x230 mm/slab_common.c:962 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x6e/0x180 mm/util.c:581 kvmalloc include/linux/slab.h:706 [inline] get_dist_table+0x91/0x380 net/sched/sch_netem.c:788 netem_change+0x947/0x1ea0 net/sched/sch_netem.c:985 netem_init+0x58/0xb0 net/sched/sch_netem.c:1072 qdisc_create+0x8a1/0x1220 net/sched/sch_api.c:1314 tc_modify_qdisc+0x9e0/0x1da0 net/sched/sch_api.c:1723 rtnetlink_rcv_msg+0x776/0xf00 net/core/rtnetlink.c:6107 netlink_rcv_skb+0x1cd/0x410 net/netlink/af_netlink.c:2525 netlink_unicast_kernel net/netlink/af_netlink.c:1328 [inline] netlink_unicast+0x7bf/0x990 net/netlink/af_netlink.c:1354 netlink_sendmsg+0xa26/0xd60 net/netlink/af_netlink.c:1903 sock_sendmsg_nosec net/socket.c:716 [inline] sock_sendmsg net/socket.c:736 [inline] ____sys_sendmsg+0x59e/0x8f0 net/socket.c:2482 ___sys_sendmsg net/socket.c:2536 [inline] __sys_sendmsg+0x2a9/0x390 net/socket.c:2565 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd stack backtrace: CPU: 1 PID: 3512 Comm: syz-executor341 Not tainted 6.1.45-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_bad_irq_dependency kernel/locking/lockdep.c:2612 [inline] check_irq_usage kernel/locking/lockdep.c:2851 [inline] check_prev_add kernel/locking/lockdep.c:3102 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain+0x4d2e/0x58e0 kernel/locking/lockdep.c:3832 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5056 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669 __fs_reclaim_acquire mm/page_alloc.c:4683 [inline] fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4697 might_alloc include/linux/sched/mm.h:271 [inline] slab_pre_alloc_hook+0x2a/0x2a0 mm/slab.h:710 slab_alloc_node mm/slub.c:3318 [inline] __kmem_cache_alloc_node+0x47/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node+0xa2/0x230 mm/slab_common.c:962 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x6e/0x180 mm/util.c:581 kvmalloc include/linux/slab.h:706 [inline] get_dist_table+0x91/0x380 net/sched/sch_netem.c:788 netem_change+0x947/0x1ea0 net/sched/sch_netem.c:985 netem_init+0x58/0xb0 net/sched/sch_netem.c:1072 qdisc_create+0x8a1/0x1220 net/sched/sch_api.c:1314 tc_modify_qdisc+0x9e0/0x1da0 net/sched/sch_api.c:1723 rtnetlink_rcv_msg+0x776/0xf00 net/core/rtnetlink.c:6107 netlink_rcv_skb+0x1cd/0x410 net/netlink/af_netlink.c:2525 netlink_unicast_kernel net/netlink/af_netlink.c:1328 [inline] netlink_unicast+0x7bf/0x990 net/netlink/af_netlink.c:1354 netlink_sendmsg+0xa26/0xd60 net/netlink/af_netlink.c:1903 sock_sendmsg_nosec net/socket.c:716 [inline] sock_sendmsg net/socket.c:736 [inline] ____sys_sendmsg+0x59e/0x8f0 net/socket.c:2482 ___sys_sendmsg net/socket.c:2536 [inline] __sys_sendmsg+0x2a9/0x390 net/socket.c:2565 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f88c51a18b9 Code: 48 83 c4 28 c3 e8 27 18 00 00 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe42069e48 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f88c51a18b9 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffe42069ec0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe4206a048 R14: 0000000000000001 R15: 0000000000000001 BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 3512, name: syz-executor341 preempt_count: 201, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 3512 Comm: syz-executor341 Not tainted 6.1.45-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 __might_resched+0x5cb/0x780 kernel/sched/core.c:9941 might_alloc include/linux/sched/mm.h:274 [inline] slab_pre_alloc_hook+0x4a/0x2a0 mm/slab.h:710 slab_alloc_node mm/slub.c:3318 [inline] __kmem_cache_alloc_node+0x47/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node+0xa2/0x230 mm/slab_common.c:962 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x6e/0x180 mm/util.c:581 kvmalloc include/linux/slab.h:706 [inline] get_dist_table+0x91/0x380 net/sched/sch_netem.c:788 netem_change+0x947/0x1ea0 net/sched/sch_netem.c:985 netem_init+0x58/0xb0 net/sched/sch_netem.c:1072 qdisc_create+0x8a1/0x1220 net/sched/sch_api.c:1314 tc_modify_qdisc+0x9e0/0x1da0 net/sched/sch_api.c:1723 rtnetlink_rcv_msg+0x776/0xf00 net/core/rtnetlink.c:6107 netlink_rcv_skb+0x1cd/0x410 net/netlink/af_netlink.c:2525 netlink_unicast_kernel net/netlink/af_netlink.c:1328 [inline] netlink_unicast+0x7bf/0x990 net/netlink/af_netlink.c:1354 netlink_sendmsg+0xa26/0xd60 net/netlink/af_netlink.c:1903 sock_sendmsg_nosec net/socket.c:716 [inline] sock_sendmsg net/socket.c:736 [inline] ____sys_sendmsg+0x59e/0x8f0 net/socket.c:2482 ___sys_sendmsg net/socket.c:2536 [inline] __sys_sendmsg+0x2a9/0x390 net/socket.c:2565 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f88c51a18b9 Code: 48 83 c4 28 c3 e8 27 18 00 00 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe42069e48 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f88c51a18b9 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffe42069ec0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe4206a048 R14: 0000000000000001 R15: 0000000000000001