============================================ WARNING: possible recursive locking detected 6.15.0-rc1-syzkaller-g0af2f6be1b42 #0 Not tainted -------------------------------------------- syz.0.16/6195 is trying to acquire lock: ffff88802740fb78 (&p->frag_sem){.+.+}-{4:4}, at: __configfs_open_file+0xe8/0x9c0 fs/configfs/file.c:304 but task is already holding lock: ffff88802740fb78 (&p->frag_sem){.+.+}-{4:4}, at: flush_write_buffer fs/configfs/file.c:205 [inline] ffff88802740fb78 (&p->frag_sem){.+.+}-{4:4}, at: configfs_write_iter+0x219/0x4e0 fs/configfs/file.c:229 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&p->frag_sem); lock(&p->frag_sem); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by syz.0.16/6195: #0: ffff888147e90420 (sb_writers#12){.+.+}-{0:0}, at: ksys_pwrite64 fs/read_write.c:791 [inline] #0: ffff888147e90420 (sb_writers#12){.+.+}-{0:0}, at: __do_sys_pwrite64 fs/read_write.c:799 [inline] #0: ffff888147e90420 (sb_writers#12){.+.+}-{0:0}, at: __se_sys_pwrite64 fs/read_write.c:796 [inline] #0: ffff888147e90420 (sb_writers#12){.+.+}-{0:0}, at: __x64_sys_pwrite64+0x1f4/0x250 fs/read_write.c:796 #1: ffff888027b07288 (&buffer->mutex){+.+.}-{4:4}, at: configfs_write_iter+0x75/0x4e0 fs/configfs/file.c:226 #2: ffff88802740fb78 (&p->frag_sem){.+.+}-{4:4}, at: flush_write_buffer fs/configfs/file.c:205 [inline] #2: ffff88802740fb78 (&p->frag_sem){.+.+}-{4:4}, at: configfs_write_iter+0x219/0x4e0 fs/configfs/file.c:229 #3: ffffffff8f4528e8 (target_devices_lock){+.+.}-{4:4}, at: target_core_item_dbroot_store+0x21/0x350 drivers/target/target_core_configfs.c:114 stack backtrace: CPU: 0 UID: 0 PID: 6195 Comm: syz.0.16 Not tainted 6.15.0-rc1-syzkaller-g0af2f6be1b42 #0 PREEMPT(full) 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+0x116/0x1f0 lib/dump_stack.c:120 print_deadlock_bug+0x1e9/0x240 kernel/locking/lockdep.c:3042 check_deadlock kernel/locking/lockdep.c:3094 [inline] validate_chain kernel/locking/lockdep.c:3896 [inline] __lock_acquire+0xff7/0x1ba0 kernel/locking/lockdep.c:5235 lock_acquire kernel/locking/lockdep.c:5866 [inline] lock_acquire+0x179/0x350 kernel/locking/lockdep.c:5823 down_read+0x9b/0x480 kernel/locking/rwsem.c:1524 __configfs_open_file+0xe8/0x9c0 fs/configfs/file.c:304 do_dentry_open+0x741/0x1c10 fs/open.c:956 vfs_open+0x82/0x3f0 fs/open.c:1086 do_open fs/namei.c:3845 [inline] path_openat+0x1e5e/0x2d40 fs/namei.c:4004 do_filp_open+0x20b/0x470 fs/namei.c:4031 file_open_name+0x2a3/0x450 fs/open.c:1373 filp_open+0x4b/0x80 fs/open.c:1393 target_core_item_dbroot_store+0x108/0x350 drivers/target/target_core_configfs.c:134 flush_write_buffer fs/configfs/file.c:207 [inline] configfs_write_iter+0x303/0x4e0 fs/configfs/file.c:229 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_pwrite64 fs/read_write.c:791 [inline] __do_sys_pwrite64 fs/read_write.c:799 [inline] __se_sys_pwrite64 fs/read_write.c:796 [inline] __x64_sys_pwrite64+0x1f4/0x250 fs/read_write.c:796 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd80e785d29 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:00007fd80f646038 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 00007fd80e975fa0 RCX: 00007fd80e785d29 RDX: 0000000000000200 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00007fd80e801b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000009 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fd80e975fa0 R15: 00007ffc01d7f148 db_root: not a directory: /sys/kernel/config/target/dbroot