====================================================== WARNING: possible circular locking dependency detected 6.14.0-syzkaller-11270-g08733088b566 #0 Not tainted ------------------------------------------------------ syz.1.953/5955 is trying to acquire lock: ffff800088a6c968 (uevent_sock_mutex){+.+.}-{4:4}, at: uevent_net_broadcast_untagged lib/kobject_uevent.c:317 [inline] ffff800088a6c968 (uevent_sock_mutex){+.+.}-{4:4}, at: kobject_uevent_net_broadcast lib/kobject_uevent.c:410 [inline] ffff800088a6c968 (uevent_sock_mutex){+.+.}-{4:4}, at: kobject_uevent_env+0x654/0x1260 lib/kobject_uevent.c:608 but task is already holding lock: ffff000014450a60 (&q->q_usage_counter(io)#26){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x18/0x30 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)#26){++++}-{0:0}: blk_alloc_queue+0x52c/0x638 block/blk-core.c:461 blk_mq_alloc_queue+0x14c/0x228 block/blk-mq.c:4349 __blk_mq_alloc_disk+0x20/0x1a4 block/blk-mq.c:4396 loop_add+0x3b4/0x93c drivers/block/loop.c:2067 loop_init+0xd0/0x138 drivers/block/loop.c:2302 do_one_initcall+0x130/0x7f0 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+0x488/0x6f0 init/main.c:1567 kernel_init+0x24/0x1e0 init/main.c:1457 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 -> #1 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:3914 [inline] fs_reclaim_acquire+0x138/0x160 mm/page_alloc.c:3928 might_alloc include/linux/sched/mm.h:318 [inline] slab_pre_alloc_hook mm/slub.c:4089 [inline] slab_alloc_node mm/slub.c:4167 [inline] kmem_cache_alloc_node_noprof+0x64/0x3b8 mm/slub.c:4239 __alloc_skb+0x208/0x2f0 net/core/skbuff.c:658 alloc_skb include/linux/skbuff.h:1340 [inline] alloc_uevent_skb+0x84/0x1f0 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+0x998/0x1260 lib/kobject_uevent.c:608 kobject_synth_uevent+0x4cc/0x61c lib/kobject_uevent.c:207 bus_uevent_store+0x38/0x6c drivers/base/bus.c:832 bus_attr_store+0x60/0x9c drivers/base/bus.c:172 sysfs_kf_write+0xe0/0x12c fs/sysfs/file.c:139 kernfs_fop_write_iter+0x23c/0x3cc fs/kernfs/file.c:334 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x4b0/0xad4 fs/read_write.c:684 ksys_write+0xec/0x1d8 fs/read_write.c:736 __do_sys_write fs/read_write.c:747 [inline] __se_sys_write fs/read_write.c:744 [inline] __arm64_sys_write+0x6c/0x9c fs/read_write.c:744 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x10c/0x138 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #0 (uevent_sock_mutex){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3166 [inline] check_prevs_add kernel/locking/lockdep.c:3285 [inline] validate_chain kernel/locking/lockdep.c:3909 [inline] __lock_acquire+0x15f4/0x2314 kernel/locking/lockdep.c:5235 lock_acquire kernel/locking/lockdep.c:5866 [inline] lock_acquire+0x310/0x38c kernel/locking/lockdep.c:5823 __mutex_lock_common kernel/locking/mutex.c:587 [inline] __mutex_lock+0x144/0x9d8 kernel/locking/mutex.c:732 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:784 uevent_net_broadcast_untagged lib/kobject_uevent.c:317 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:410 [inline] kobject_uevent_env+0x654/0x1260 lib/kobject_uevent.c:608 kobject_uevent+0x14/0x20 lib/kobject_uevent.c:656 loop_set_size drivers/block/loop.c:211 [inline] loop_set_size drivers/block/loop.c:208 [inline] loop_set_status+0x6ec/0x920 drivers/block/loop.c:1306 loop_set_status_old+0x120/0x180 drivers/block/loop.c:1405 lo_ioctl+0x52c/0x1cc8 drivers/block/loop.c:1575 blkdev_ioctl+0x22c/0x7f4 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] __arm64_sys_ioctl+0x12c/0x188 fs/ioctl.c:892 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x10c/0x138 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 other info that might help us debug this: Chain exists of: uevent_sock_mutex --> fs_reclaim --> &q->q_usage_counter(io)#26 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&q->q_usage_counter(io)#26); lock(fs_reclaim); lock(&q->q_usage_counter(io)#26); lock(uevent_sock_mutex); *** DEADLOCK *** 3 locks held by syz.1.953/5955: #0: ffff0000143f5b68 (&lo->lo_mutex){+.+.}-{4:4}, at: loop_set_status+0x30/0x920 drivers/block/loop.c:1275 #1: ffff000014450a60 (&q->q_usage_counter(io)#26){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x18/0x30 block/blk-mq.c:215 #2: ffff000014450a98 (&q->q_usage_counter(queue)#20){+.+.}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x18/0x30 block/blk-mq.c:215 stack backtrace: CPU: 1 UID: 0 PID: 5955 Comm: syz.1.953 Not tainted 6.14.0-syzkaller-11270-g08733088b566 #0 PREEMPT Hardware name: linux,dummy-virt (DT) Call trace: show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xa4/0xf4 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x28c/0x370 kernel/locking/lockdep.c:2079 check_noncircular+0x168/0x17c kernel/locking/lockdep.c:2211 check_prev_add kernel/locking/lockdep.c:3166 [inline] check_prevs_add kernel/locking/lockdep.c:3285 [inline] validate_chain kernel/locking/lockdep.c:3909 [inline] __lock_acquire+0x15f4/0x2314 kernel/locking/lockdep.c:5235 lock_acquire kernel/locking/lockdep.c:5866 [inline] lock_acquire+0x310/0x38c kernel/locking/lockdep.c:5823 __mutex_lock_common kernel/locking/mutex.c:587 [inline] __mutex_lock+0x144/0x9d8 kernel/locking/mutex.c:732 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:784 uevent_net_broadcast_untagged lib/kobject_uevent.c:317 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:410 [inline] kobject_uevent_env+0x654/0x1260 lib/kobject_uevent.c:608 kobject_uevent+0x14/0x20 lib/kobject_uevent.c:656 loop_set_size drivers/block/loop.c:211 [inline] loop_set_size drivers/block/loop.c:208 [inline] loop_set_status+0x6ec/0x920 drivers/block/loop.c:1306 loop_set_status_old+0x120/0x180 drivers/block/loop.c:1405 lo_ioctl+0x52c/0x1cc8 drivers/block/loop.c:1575 blkdev_ioctl+0x22c/0x7f4 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] __arm64_sys_ioctl+0x12c/0x188 fs/ioctl.c:892 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x10c/0x138 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600