====================================================== WARNING: possible circular locking dependency detected 6.14.0-rc2-syzkaller #0 Not tainted ------------------------------------------------------ syz.0.285/5325 is trying to acquire lock: ffffffff83a1b588 (uevent_sock_mutex){+.+.}-{4:4}, at: uevent_net_broadcast_untagged lib/kobject_uevent.c:317 [inline] ffffffff83a1b588 (uevent_sock_mutex){+.+.}-{4:4}, at: kobject_uevent_net_broadcast lib/kobject_uevent.c:410 [inline] ffffffff83a1b588 (uevent_sock_mutex){+.+.}-{4:4}, at: kobject_uevent_env+0x39a/0x860 lib/kobject_uevent.c:608 but task is already holding lock: ffff888102adc0c0 (&q->q_usage_counter(io)#8){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0xd/0x20 block/blk-mq.c:215 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&q->q_usage_counter(io)#8){++++}-{0:0}: blk_alloc_queue+0x317/0x360 block/blk-core.c:461 blk_mq_alloc_queue+0x61/0xd0 block/blk-mq.c:4349 __blk_mq_alloc_disk+0x13/0x60 block/blk-mq.c:4396 loop_add+0x1f5/0x3e0 drivers/block/loop.c:2059 loop_init+0xb4/0x100 drivers/block/loop.c:2294 do_one_initcall+0x6f/0x340 init/main.c:1257 do_initcall_level init/main.c:1319 [inline] do_initcalls init/main.c:1335 [inline] do_basic_setup init/main.c:1354 [inline] kernel_init_freeable+0x23e/0x3f0 init/main.c:1568 kernel_init+0x15/0x1b0 init/main.c:1457 ret_from_fork+0x2c/0x50 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 -> #1 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:3853 [inline] fs_reclaim_acquire+0x98/0xd0 mm/page_alloc.c:3867 might_alloc include/linux/sched/mm.h:318 [inline] slab_pre_alloc_hook mm/slub.c:4066 [inline] slab_alloc_node mm/slub.c:4144 [inline] kmem_cache_alloc_node_noprof+0x57/0x420 mm/slub.c:4216 __alloc_skb+0x15b/0x1a0 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1331 [inline] alloc_uevent_skb+0x45/0xc0 lib/kobject_uevent.c:289 uevent_net_broadcast_untagged lib/kobject_uevent.c:326 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:410 [inline] kobject_uevent_env+0x437/0x860 lib/kobject_uevent.c:608 kobject_synth_uevent+0x326/0x330 lib/kobject_uevent.c:207 bus_uevent_store+0x2a/0x60 drivers/base/bus.c:832 kernfs_fop_write_iter+0x141/0x1e0 fs/kernfs/file.c:334 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x2b7/0x560 fs/read_write.c:679 ksys_write+0x6f/0xf0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x80/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (uevent_sock_mutex){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x1360/0x1ba0 kernel/locking/lockdep.c:5228 lock_acquire kernel/locking/lockdep.c:5851 [inline] lock_acquire+0xce/0x2d0 kernel/locking/lockdep.c:5816 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0xc6/0xa90 kernel/locking/mutex.c:730 uevent_net_broadcast_untagged lib/kobject_uevent.c:317 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:410 [inline] kobject_uevent_env+0x39a/0x860 lib/kobject_uevent.c:608 loop_set_size drivers/block/loop.c:217 [inline] loop_set_size drivers/block/loop.c:214 [inline] loop_set_status+0x26c/0x280 drivers/block/loop.c:1298 loop_set_status_old+0x125/0x160 drivers/block/loop.c:1397 blkdev_ioctl+0x13d/0x2a0 block/ioctl.c:698 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0x8f/0xc0 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x80/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: uevent_sock_mutex --> fs_reclaim --> &q->q_usage_counter(io)#8 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&q->q_usage_counter(io)#8); lock(fs_reclaim); lock(&q->q_usage_counter(io)#8); lock(uevent_sock_mutex); *** DEADLOCK *** 3 locks held by syz.0.285/5325: #0: ffff888106eecf68 (&lo->lo_mutex){+.+.}-{4:4}, at: loop_set_status+0x25/0x280 drivers/block/loop.c:1267 #1: ffff888102adc0c0 (&q->q_usage_counter(io)#8){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0xd/0x20 block/blk-mq.c:215 #2: ffff888102adc0f8 (&q->q_usage_counter(queue)#2){+.+.}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0xd/0x20 block/blk-mq.c:215 stack backtrace: CPU: 0 UID: 0 PID: 5325 Comm: syz.0.285 Not tainted 6.14.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x78/0xe0 lib/dump_stack.c:120 print_circular_bug+0x26e/0x2f0 kernel/locking/lockdep.c:2076 check_noncircular+0x11d/0x130 kernel/locking/lockdep.c:2208 check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x1360/0x1ba0 kernel/locking/lockdep.c:5228 lock_acquire kernel/locking/lockdep.c:5851 [inline] lock_acquire+0xce/0x2d0 kernel/locking/lockdep.c:5816 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0xc6/0xa90 kernel/locking/mutex.c:730 uevent_net_broadcast_untagged lib/kobject_uevent.c:317 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:410 [inline] kobject_uevent_env+0x39a/0x860 lib/kobject_uevent.c:608 loop_set_size drivers/block/loop.c:217 [inline] loop_set_size drivers/block/loop.c:214 [inline] loop_set_status+0x26c/0x280 drivers/block/loop.c:1298 loop_set_status_old+0x125/0x160 drivers/block/loop.c:1397 blkdev_ioctl+0x13d/0x2a0 block/ioctl.c:698 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0x8f/0xc0 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x80/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff40098d169 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff4018b8038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ff400ba5fa0 RCX: 00007ff40098d169 RDX: 0000200000000200 RSI: 0000000000004c02 RDI: 0000000000000004 RBP: 00007ff400a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff400ba5fa0 R15: 00007ffffa1c9818