=====================================================
WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
5.15.120-syzkaller #0 Not tainted
-----------------------------------------------------
syz-executor.0/13598 [HC0[0]:SC0[2]:HE1:SE0] is trying to acquire:
ffffffff8c9deda0 (fs_reclaim){+.+.}-{0:0}, at: might_alloc include/linux/sched/mm.h:206 [inline]
ffffffff8c9deda0 (fs_reclaim){+.+.}-{0:0}, at: slab_pre_alloc_hook+0x22/0xc0 mm/slab.h:492
and this task is already holding:
ffffffff8da1f8c8 (noop_qdisc.q.lock){+.-.}-{2:2}, at: netem_change+0x257/0x20c0 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+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:363 [inline]
net_tx_action+0x6c5/0x8e0 net/core/dev.c:5049
__do_softirq+0x3b3/0x93a kernel/softirq.c:558
do_softirq+0x162/0x240 kernel/softirq.c:459
__local_bh_enable_ip+0x1b1/0x1f0 kernel/softirq.c:383
netif_tx_unlock_bh include/linux/netdevice.h:4545 [inline]
dev_watchdog_down net/sched/sch_generic.c:514 [inline]
dev_deactivate_many+0x524/0xbf0 net/sched/sch_generic.c:1302
dev_deactivate+0x177/0x270 net/sched/sch_generic.c:1336
linkwatch_do_dev+0x104/0x160 net/core/link_watch.c:165
__linkwatch_run_queue+0x4ca/0x7f0 net/core/link_watch.c:213
linkwatch_event+0x48/0x50 net/core/link_watch.c:252
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2307
worker_thread+0xaca/0x1280 kernel/workqueue.c:2454
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
to a SOFTIRQ-irq-unsafe lock:
(fs_reclaim){+.+.}-{0:0}
... which became SOFTIRQ-irq-unsafe at:
...
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__fs_reclaim_acquire mm/page_alloc.c:4547 [inline]
fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4561
might_alloc include/linux/sched/mm.h:206 [inline]
slab_pre_alloc_hook+0x22/0xc0 mm/slab.h:492
slab_alloc_node mm/slub.c:3134 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc_trace+0x49/0x290 mm/slub.c:3245
kmalloc include/linux/slab.h:591 [inline]
kzalloc include/linux/slab.h:721 [inline]
alloc_workqueue_attrs kernel/workqueue.c:3403 [inline]
wq_numa_init+0x122/0x49f kernel/workqueue.c:5994
workqueue_init+0x18/0x5e1 kernel/workqueue.c:6121
kernel_init_freeable+0x40a/0x5c5 init/main.c:1603
kernel_init+0x19/0x290 init/main.c:1510
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
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);
<Interrupt>
lock(noop_qdisc.q.lock);
*** DEADLOCK ***
2 locks held by syz-executor.0/13598:
#0: ffffffff8d9e02c8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline]
#0: ffffffff8d9e02c8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x94c/0xee0 net/core/rtnetlink.c:5590
#1: ffffffff8da1f8c8 (noop_qdisc.q.lock){+.-.}-{2:2}, at: netem_change+0x257/0x20c0 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+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2a/0x40 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+0xad6/0x3230 net/core/dev.c:4190
tx+0x64/0x100 drivers/block/aoe/aoenet.c:63
kthread+0x234/0x440 drivers/block/aoe/aoecmd.c:1230
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
IN-SOFTIRQ-W at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:363 [inline]
net_tx_action+0x6c5/0x8e0 net/core/dev.c:5049
__do_softirq+0x3b3/0x93a kernel/softirq.c:558
do_softirq+0x162/0x240 kernel/softirq.c:459
__local_bh_enable_ip+0x1b1/0x1f0 kernel/softirq.c:383
netif_tx_unlock_bh include/linux/netdevice.h:4545 [inline]
dev_watchdog_down net/sched/sch_generic.c:514 [inline]
dev_deactivate_many+0x524/0xbf0 net/sched/sch_generic.c:1302
dev_deactivate+0x177/0x270 net/sched/sch_generic.c:1336
linkwatch_do_dev+0x104/0x160 net/core/link_watch.c:165
__linkwatch_run_queue+0x4ca/0x7f0 net/core/link_watch.c:213
linkwatch_event+0x48/0x50 net/core/link_watch.c:252
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2307
worker_thread+0xaca/0x1280 kernel/workqueue.c:2454
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
INITIAL USE at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2a/0x40 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+0xad6/0x3230 net/core/dev.c:4190
tx+0x64/0x100 drivers/block/aoe/aoenet.c:63
kthread+0x234/0x440 drivers/block/aoe/aoecmd.c:1230
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
}
... key at: [<ffffffff8da1f8c8>] 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+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__fs_reclaim_acquire mm/page_alloc.c:4547 [inline]
fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4561
might_alloc include/linux/sched/mm.h:206 [inline]
slab_pre_alloc_hook+0x22/0xc0 mm/slab.h:492
slab_alloc_node mm/slub.c:3134 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc_trace+0x49/0x290 mm/slub.c:3245
kmalloc include/linux/slab.h:591 [inline]
kzalloc include/linux/slab.h:721 [inline]
alloc_workqueue_attrs kernel/workqueue.c:3403 [inline]
wq_numa_init+0x122/0x49f kernel/workqueue.c:5994
workqueue_init+0x18/0x5e1 kernel/workqueue.c:6121
kernel_init_freeable+0x40a/0x5c5 init/main.c:1603
kernel_init+0x19/0x290 init/main.c:1510
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
SOFTIRQ-ON-W at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__fs_reclaim_acquire mm/page_alloc.c:4547 [inline]
fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4561
might_alloc include/linux/sched/mm.h:206 [inline]
slab_pre_alloc_hook+0x22/0xc0 mm/slab.h:492
slab_alloc_node mm/slub.c:3134 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc_trace+0x49/0x290 mm/slub.c:3245
kmalloc include/linux/slab.h:591 [inline]
kzalloc include/linux/slab.h:721 [inline]
alloc_workqueue_attrs kernel/workqueue.c:3403 [inline]
wq_numa_init+0x122/0x49f kernel/workqueue.c:5994
workqueue_init+0x18/0x5e1 kernel/workqueue.c:6121
kernel_init_freeable+0x40a/0x5c5 init/main.c:1603
kernel_init+0x19/0x290 init/main.c:1510
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
INITIAL USE at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__fs_reclaim_acquire mm/page_alloc.c:4547 [inline]
fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4561
might_alloc include/linux/sched/mm.h:206 [inline]
slab_pre_alloc_hook+0x22/0xc0 mm/slab.h:492
slab_alloc_node mm/slub.c:3134 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc_trace+0x49/0x290 mm/slub.c:3245
kmalloc include/linux/slab.h:591 [inline]
kzalloc include/linux/slab.h:721 [inline]
alloc_workqueue_attrs kernel/workqueue.c:3403 [inline]
wq_numa_init+0x122/0x49f kernel/workqueue.c:5994
workqueue_init+0x18/0x5e1 kernel/workqueue.c:6121
kernel_init_freeable+0x40a/0x5c5 init/main.c:1603
kernel_init+0x19/0x290 init/main.c:1510
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
}
... key at: [<ffffffff8c9deda0>] __fs_reclaim_map+0x0/0x160
... acquired at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__fs_reclaim_acquire mm/page_alloc.c:4547 [inline]
fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4561
might_alloc include/linux/sched/mm.h:206 [inline]
slab_pre_alloc_hook+0x22/0xc0 mm/slab.h:492
slab_alloc_node mm/slub.c:3134 [inline]
__kmalloc_node+0x71/0x390 mm/slub.c:4451
kmalloc_node include/linux/slab.h:614 [inline]
kvmalloc_node+0x80/0x140 mm/util.c:619
kvmalloc include/linux/mm.h:805 [inline]
get_dist_table+0x83/0x2c0 net/sched/sch_netem.c:788
netem_change+0xa05/0x20c0 net/sched/sch_netem.c:988
netem_init+0x58/0xb0 net/sched/sch_netem.c:1075
qdisc_create+0x8ae/0x1390 net/sched/sch_api.c:1264
tc_modify_qdisc+0xac5/0x1710
rtnetlink_rcv_msg+0x993/0xee0 net/core/rtnetlink.c:5593
netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2504
netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline]
netlink_unicast+0x7b6/0x980 net/netlink/af_netlink.c:1356
netlink_sendmsg+0xa30/0xd60 net/netlink/af_netlink.c:1923
sock_sendmsg_nosec net/socket.c:704 [inline]
sock_sendmsg net/socket.c:724 [inline]
____sys_sendmsg+0x59e/0x8f0 net/socket.c:2412
___sys_sendmsg+0x252/0x2e0 net/socket.c:2466
__sys_sendmsg net/socket.c:2495 [inline]
__do_sys_sendmsg net/socket.c:2504 [inline]
__se_sys_sendmsg+0x19a/0x260 net/socket.c:2502
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+0x61/0xcb
stack backtrace:
CPU: 1 PID: 13598 Comm: syz-executor.0 Not tainted 5.15.120-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
Call Trace:
<TASK>
__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:2567 [inline]
check_irq_usage kernel/locking/lockdep.c:2806 [inline]
check_prev_add kernel/locking/lockdep.c:3057 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain+0x4cfe/0x58b0 kernel/locking/lockdep.c:3787
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5011
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__fs_reclaim_acquire mm/page_alloc.c:4547 [inline]
fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4561
might_alloc include/linux/sched/mm.h:206 [inline]
slab_pre_alloc_hook+0x22/0xc0 mm/slab.h:492
slab_alloc_node mm/slub.c:3134 [inline]
__kmalloc_node+0x71/0x390 mm/slub.c:4451
kmalloc_node include/linux/slab.h:614 [inline]
kvmalloc_node+0x80/0x140 mm/util.c:619
kvmalloc include/linux/mm.h:805 [inline]
get_dist_table+0x83/0x2c0 net/sched/sch_netem.c:788
netem_change+0xa05/0x20c0 net/sched/sch_netem.c:988
netem_init+0x58/0xb0 net/sched/sch_netem.c:1075
qdisc_create+0x8ae/0x1390 net/sched/sch_api.c:1264
tc_modify_qdisc+0xac5/0x1710
rtnetlink_rcv_msg+0x993/0xee0 net/core/rtnetlink.c:5593
netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2504
netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline]
netlink_unicast+0x7b6/0x980 net/netlink/af_netlink.c:1356
netlink_sendmsg+0xa30/0xd60 net/netlink/af_netlink.c:1923
sock_sendmsg_nosec net/socket.c:704 [inline]
sock_sendmsg net/socket.c:724 [inline]
____sys_sendmsg+0x59e/0x8f0 net/socket.c:2412
___sys_sendmsg+0x252/0x2e0 net/socket.c:2466
__sys_sendmsg net/socket.c:2495 [inline]
__do_sys_sendmsg net/socket.c:2504 [inline]
__se_sys_sendmsg+0x19a/0x260 net/socket.c:2502
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+0x61/0xcb
RIP: 0033:0x7fd2bfca0b29
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd2be2010c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fd2bfdc0050 RCX: 00007fd2bfca0b29
RDX: 0000000000000000 RSI: 0000000020001400 RDI: 0000000000000005
RBP: 00007fd2bfcec47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007fd2bfdc0050 R15: 00007fff95090978
</TASK>
BUG: sleeping function called from invalid context at include/linux/sched/mm.h:209
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 13598, name: syz-executor.0
INFO: lockdep is turned off.
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 1 PID: 13598 Comm: syz-executor.0 Not tainted 5.15.120-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
___might_sleep+0x547/0x6a0 kernel/sched/core.c:9625
might_alloc include/linux/sched/mm.h:209 [inline]
slab_pre_alloc_hook+0x44/0xc0 mm/slab.h:492
slab_alloc_node mm/slub.c:3134 [inline]
__kmalloc_node+0x71/0x390 mm/slub.c:4451
kmalloc_node include/linux/slab.h:614 [inline]
kvmalloc_node+0x80/0x140 mm/util.c:619
kvmalloc include/linux/mm.h:805 [inline]
get_dist_table+0x83/0x2c0 net/sched/sch_netem.c:788
netem_change+0xa05/0x20c0 net/sched/sch_netem.c:988
netem_init+0x58/0xb0 net/sched/sch_netem.c:1075
qdisc_create+0x8ae/0x1390 net/sched/sch_api.c:1264
tc_modify_qdisc+0xac5/0x1710
rtnetlink_rcv_msg+0x993/0xee0 net/core/rtnetlink.c:5593
netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2504
netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline]
netlink_unicast+0x7b6/0x980 net/netlink/af_netlink.c:1356
netlink_sendmsg+0xa30/0xd60 net/netlink/af_netlink.c:1923
sock_sendmsg_nosec net/socket.c:704 [inline]
sock_sendmsg net/socket.c:724 [inline]
____sys_sendmsg+0x59e/0x8f0 net/socket.c:2412
___sys_sendmsg+0x252/0x2e0 net/socket.c:2466
__sys_sendmsg net/socket.c:2495 [inline]
__do_sys_sendmsg net/socket.c:2504 [inline]
__se_sys_sendmsg+0x19a/0x260 net/socket.c:2502
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+0x61/0xcb
RIP: 0033:0x7fd2bfca0b29
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd2be2010c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fd2bfdc0050 RCX: 00007fd2bfca0b29
RDX: 0000000000000000 RSI: 0000000020001400 RDI: 0000000000000005
RBP: 00007fd2bfcec47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007fd2bfdc0050 R15: 00007fff95090978
</TASK>