============================================ WARNING: possible recursive locking detected 6.13.0-rc1-syzkaller-00025-gfeffde684ac2 #0 Not tainted -------------------------------------------- syz.0.35/6120 is trying to acquire lock: ffff88803374f528 (&sbi->s_alloc_mutex){+.+.}-{4:4}, at: udf_table_free_blocks fs/udf/balloc.c:375 [inline] ffff88803374f528 (&sbi->s_alloc_mutex){+.+.}-{4:4}, at: udf_free_blocks+0x9ff/0x2270 fs/udf/balloc.c:677 but task is already holding lock: ffff88803374f528 (&sbi->s_alloc_mutex){+.+.}-{4:4}, at: udf_table_new_block fs/udf/balloc.c:581 [inline] ffff88803374f528 (&sbi->s_alloc_mutex){+.+.}-{4:4}, at: udf_new_block+0xf81/0x21c0 fs/udf/balloc.c:725 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sbi->s_alloc_mutex); lock(&sbi->s_alloc_mutex); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by syz.0.35/6120: #0: ffff88806b9b6420 (sb_writers#21){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:515 #1: ffff88805b880900 (&type->i_mutex_dir_key#16){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #1: ffff88805b880900 (&type->i_mutex_dir_key#16){+.+.}-{4:4}, at: open_last_lookups fs/namei.c:3745 [inline] #1: ffff88805b880900 (&type->i_mutex_dir_key#16){+.+.}-{4:4}, at: path_openat+0x89a/0x3590 fs/namei.c:3984 #2: ffff88805b880730 (&ei->i_data_sem#2){++++}-{4:4}, at: udf_map_block+0x3b7/0x5340 fs/udf/inode.c:439 #3: ffff88803374f528 (&sbi->s_alloc_mutex){+.+.}-{4:4}, at: udf_table_new_block fs/udf/balloc.c:581 [inline] #3: ffff88803374f528 (&sbi->s_alloc_mutex){+.+.}-{4:4}, at: udf_new_block+0xf81/0x21c0 fs/udf/balloc.c:725 stack backtrace: CPU: 1 UID: 0 PID: 6120 Comm: syz.0.35 Not tainted 6.13.0-rc1-syzkaller-00025-gfeffde684ac2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x1ac/0xee0 kernel/locking/mutex.c:735 udf_table_free_blocks fs/udf/balloc.c:375 [inline] udf_free_blocks+0x9ff/0x2270 fs/udf/balloc.c:677 udf_delete_aext+0x70a/0xed0 fs/udf/inode.c:2372 udf_table_new_block fs/udf/balloc.c:645 [inline] udf_new_block+0x18ba/0x21c0 fs/udf/balloc.c:725 inode_getblk fs/udf/inode.c:894 [inline] udf_map_block+0x1c9a/0x5340 fs/udf/inode.c:447 udf_bread+0x14c/0x620 fs/udf/inode.c:1242 udf_fiiter_append_blk+0x3aa/0x9f0 fs/udf/directory.c:477 udf_fiiter_add_entry+0xcb6/0x1ff0 fs/udf/namei.c:284 udf_add_nondir+0xee/0x3d0 fs/udf/namei.c:353 lookup_open fs/namei.c:3649 [inline] open_last_lookups fs/namei.c:3748 [inline] path_openat+0x1c03/0x3590 fs/namei.c:3984 do_filp_open+0x27f/0x4e0 fs/namei.c:4014 do_sys_openat2+0x13e/0x1d0 fs/open.c:1402 do_sys_open fs/open.c:1417 [inline] __do_sys_creat fs/open.c:1495 [inline] __se_sys_creat fs/open.c:1489 [inline] __x64_sys_creat+0x123/0x170 fs/open.c:1489 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb496f7ff19 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:00007fb497ce7058 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fb497146160 RCX: 00007fb496f7ff19 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000e00 RBP: 00007fb496ff3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fb497146160 R15: 00007ffd939da518