============================================ WARNING: possible recursive locking detected 6.1.141-syzkaller #0 Not tainted -------------------------------------------- syz.1.2638/16423 is trying to acquire lock: ffff8880583d0528 (&sbi->s_alloc_mutex){+.+.}-{3:3}, at: udf_table_free_blocks fs/udf/balloc.c:395 [inline] ffff8880583d0528 (&sbi->s_alloc_mutex){+.+.}-{3:3}, at: udf_free_blocks+0x8f6/0x16c0 fs/udf/balloc.c:686 but task is already holding lock: ffff8880583d0528 (&sbi->s_alloc_mutex){+.+.}-{3:3}, at: udf_table_prealloc_blocks fs/udf/balloc.c:534 [inline] ffff8880583d0528 (&sbi->s_alloc_mutex){+.+.}-{3:3}, at: udf_prealloc_blocks+0x7aa/0xed0 fs/udf/balloc.c:710 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.1.2638/16423: #0: ffff888065650460 (sb_writers#28){.+.+}-{0:0}, at: do_sendfile+0x5a9/0xeb0 fs/read_write.c:1254 #1: ffff88805071c2b8 (&sb->s_type->i_mutex_key#36){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #1: ffff88805071c2b8 (&sb->s_type->i_mutex_key#36){+.+.}-{3:3}, at: udf_file_write_iter+0x6e/0x650 fs/udf/file.c:145 #2: ffff88805071c0e0 (&ei->i_data_sem#2){++++}-{3:3}, at: udf_get_block+0xf6/0x3cd0 fs/udf/inode.c:346 #3: ffff8880583d0528 (&sbi->s_alloc_mutex){+.+.}-{3:3}, at: udf_table_prealloc_blocks fs/udf/balloc.c:534 [inline] #3: ffff8880583d0528 (&sbi->s_alloc_mutex){+.+.}-{3:3}, at: udf_prealloc_blocks+0x7aa/0xed0 fs/udf/balloc.c:710 stack backtrace: CPU: 0 PID: 16423 Comm: syz.1.2638 Not tainted 6.1.141-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 __lock_acquire+0x122f/0x7c50 kernel/locking/lockdep.c:-1 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x120/0xaf0 kernel/locking/mutex.c:747 udf_table_free_blocks fs/udf/balloc.c:395 [inline] udf_free_blocks+0x8f6/0x16c0 fs/udf/balloc.c:686 udf_delete_aext+0x4cd/0xbb0 fs/udf/inode.c:2207 udf_table_prealloc_blocks fs/udf/balloc.c:558 [inline] udf_prealloc_blocks+0x9ff/0xed0 fs/udf/balloc.c:710 udf_prealloc_extents fs/udf/inode.c:909 [inline] inode_getblk fs/udf/inode.c:768 [inline] udf_get_block+0x1ba0/0x3cd0 fs/udf/inode.c:359 __block_write_begin_int+0x54b/0x1a70 fs/buffer.c:1991 __block_write_begin fs/buffer.c:2041 [inline] block_write_begin+0x96/0x1e0 fs/buffer.c:2102 udf_write_begin+0x31/0x70 fs/udf/inode.c:212 generic_perform_write+0x2db/0x560 mm/filemap.c:3846 __generic_file_write_iter+0x2b4/0x430 mm/filemap.c:3942 udf_file_write_iter+0x28c/0x650 fs/udf/file.c:164 do_iter_readv_writev fs/read_write.c:-1 [inline] do_iter_write+0x62d/0xaf0 fs/read_write.c:861 iter_file_splice_write+0x665/0xc50 fs/splice.c:685 do_splice_from fs/splice.c:763 [inline] direct_splice_actor+0xe1/0x130 fs/splice.c:950 splice_direct_to_actor+0x480/0xb60 fs/splice.c:896 do_splice_direct+0x1b0/0x2b0 fs/splice.c:1002 do_sendfile+0x5cc/0xeb0 fs/read_write.c:1255 __do_sys_sendfile64 fs/read_write.c:1323 [inline] __se_sys_sendfile64+0x13b/0x190 fs/read_write.c:1309 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fc005d8e929 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:00007fc006c9c038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007fc005fb5fa0 RCX: 00007fc005d8e929 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004 RBP: 00007fc005e10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000800000009 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fc005fb5fa0 R15: 00007fff0a830ed8