program: syz_mount_image$udf(&(0x7f0000000180), &(0x7f0000000100)='./bus\x00', 0x1014494, &(0x7f00000002c0)={[{@iocharset={'iocharset', 0x3d, 'iso8859-4'}}, {@partition={'partition', 0x3d, 0x6}}, {@gid_forget}, {@session={'session', 0x3d, 0xfe8}}, {@noadinicb}, {@anchor}, {@uid_forget}]}, 0xfe, 0xc24, &(0x7f0000001480)="$eJzs3UFsHNd9B+D/Gy5Fym4rJk5Uu42LTVukMmO5sqSYilW4q5pmG0CWiVDMLQBX5EpdmFoSJNXIRtrQvfTQQ4Ci6CEnAq1RIEUDoymCHtnWBZKLD0VOPREtbARFD2wRIKeAxcy+lZY0ZcmmSFH299nUbznz3ux7b5YzkqA3LwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAiN976cKpZ9ODbgUAcJAuTX311Gn3fwD4RLnsz/8AAAAAAAAAAAAAAHDYpSjisUixeGkzzVTfdw1fbHdu3Jwen9i92tFU1Ryoypdfw8+ePnP2S8+NnevlB9e/356IV6YuX6i/uHB9cam1vNyaq0932rMLc617PsJe6+80Wg1A/fqrN+auXl2un37mzLbdN0feG3r0+Mj5sadOPtkrOz0+MTHVV6Y2+JHf/X3uNMPjSBRxMlI8/b2fpGZEFLH3sbjLZ2e/Ha06MVp1Ynp8ourIfLvZWSl3TvYGooio91Vq9MboAM7FnjQiVsvmlw0eLbs3tdhcal6Zb9Unm0sr7ZX2QmcydVtb9qceRZxLEWsRsTH0/sMNRhG1SPGdY5vpSkQM9Mbhi9XE4Du3o9jHPt6Dsp31wYi14iE4Z4fYUBTxcqT46dtFzJZjlr/iCxEvl/mDiDfLfCEilR+MsxHv7vI54uFUiyL+vDz/5zfTXHU96F1XLn6t/pXO1YW+sr3rykN/fzhIh/zaNBxFNKsr/mb66L/ZAQAAAAAAAAAAAAAAAOB+OxpFPBEpXvr3P6rmFUc1L/3Y+bHfH/nF/jnjj9/lOGXZZyJitbi3OblH8hTiyTSZ0gOeS/xJNhxF/HGe//fGg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AAAAAAAAAAAAAD4eCmq/1J8+xubaWuou770THRz3XqgH3v/HwAA//9wn/vk") r0 = open(&(0x7f0000000240)='./file1\x00', 0x145142, 0x0) ftruncate(r0, 0x2007ffc) sendfile(r0, r0, 0x0, 0x800000009) ioctl$EVIOCSFF(0xffffffffffffffff, 0x40304580, &(0x7f00000006c0)={0x0, 0x2, 0x0, {0x0, 0x1}, {0x45, 0x400}, @period={0x59, 0x0, 0x0, 0x0, 0x0, {0x0, 0x0, 0x40}, 0x0, 0x0}}) r1 = syz_open_dev$evdev(&(0x7f0000000000), 0x1, 0x8c2b01) write$char_usb(r1, &(0x7f0000000040)="e2", 0x12d8) ioctl$EVIOCSFF(0xffffffffffffffff, 0x40304580, &(0x7f00000006c0)={0x0, 0x2, 0x1, {0x0, 0x1}, {0x48, 0xfbff}, @rumble={0xf, 0xff}}) r2 = syz_open_dev$evdev(&(0x7f0000000000), 0x1, 0x8c2b01) write$char_usb(r2, &(0x7f0000000040)="e2", 0x12d8) r3 = open(&(0x7f0000000000)='./bus\x00', 0x60142, 0x0) r4 = open(&(0x7f0000000080)='./bus\x00', 0x107382, 0x1d0) ftruncate(r4, 0x2007ffb) sendfile(r3, r4, 0x0, 0x1000000201005) syz_usb_connect$hid(0x0, 0x36, &(0x7f0000000140)={{0x12, 0x1, 0x250, 0x0, 0x0, 0x0, 0x40, 0x6cb, 0x2968, 0x40, 0x1, 0x2, 0x3, 0x1, [{{0x9, 0x2, 0x24, 0x1, 0x1, 0x2, 0x20, 0x5, [{{0x9, 0x4, 0x0, 0xfe, 0x1, 0x3, 0x1, 0x3, 0x0, {0x9, 0x21, 0x7, 0x1, 0x1, {0x22, 0x9f8}}, {{{0x9, 0x5, 0x81, 0x3, 0x40, 0x1, 0x80, 0xb5}}}}}]}}]}}, 0x0) truncate(&(0x7f00000013c0)='./file1\x00', 0x0) symlink(&(0x7f0000000080)='.\x00', &(0x7f0000000000)='./file0\x00') r5 = openat$cgroup_ro(0xffffffffffffff9c, &(0x7f00000001c0)='cpuset.effective_mems\x00', 0x275a, 0x0) write$cgroup_int(r5, &(0x7f0000000380), 0x101bf) [ 75.436302][ T4684] Bluetooth: hci0: command tx timeout [ 75.517253][ T5340] loop0: detected capacity change from 0 to 2048 [ 75.545937][ T5340] UDF-fs: error (device loop0): udf_read_tagged: read failed, block=2362, location=2362 [ 75.567286][ T5340] UDF-fs: error (device loop0): udf_read_tagged: tag checksum failed, block 99: 0x27 != 0x4d [ 75.578876][ T5340] UDF-fs: error (device loop0): udf_read_tagged: tag checksum failed, block 160: 0xd2 != 0xd4 [ 75.603823][ T5340] UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) [ 75.627350][ T25] audit: type=1800 audit(1753012767.933:2): pid=5340 uid=0 auid=4294967295 ses=4294967295 subj=unconfined op=collect_data cause=failed(directio) comm="syz.0.0" name="file1" dev="loop0" ino=1346 res=0 errno=0 [ 76.011381][ T5333] usb 5-1: new high-speed USB device number 2 using dummy_hcd [ 76.145998][ T1313] ieee802154 phy0 wpan0: encryption failed: -22 [ 76.149028][ T1313] ieee802154 phy1 wpan1: encryption failed: -22 [ 76.240152][ T5340] [ 76.241321][ T5340] ============================================ [ 76.244157][ T5340] WARNING: possible recursive locking detected [ 76.247104][ T5340] 6.16.0-rc6-syzkaller-00281-gf4a40a4282f4 #0 Not tainted [ 76.250460][ T5340] -------------------------------------------- [ 76.253378][ T5340] syz.0.0/5340 is trying to acquire lock: [ 76.255867][ T5340] ffff8880403a7d28 (&sbi->s_alloc_mutex){+.+.}-{4:4}, at: udf_free_blocks+0x9e2/0x17f0 [ 76.260084][ T5340] [ 76.260084][ T5340] but task is already holding lock: [ 76.263316][ T5340] ffff8880403a7d28 (&sbi->s_alloc_mutex){+.+.}-{4:4}, at: udf_prealloc_blocks+0x8d0/0x10b0 [ 76.267498][ T5340] [ 76.267498][ T5340] other info that might help us debug this: [ 76.271136][ T5340] Possible unsafe locking scenario: [ 76.271136][ T5340] [ 76.274492][ T5340] CPU0 [ 76.276066][ T5340] ---- [ 76.277735][ T5340] lock(&sbi->s_alloc_mutex); [ 76.279901][ T5340] lock(&sbi->s_alloc_mutex); [ 76.282094][ T5340] [ 76.282094][ T5340] *** DEADLOCK *** [ 76.282094][ T5340] [ 76.285827][ T5340] May be due to missing lock nesting notation [ 76.285827][ T5340] [ 76.289876][ T5340] 5 locks held by syz.0.0/5340: [ 76.292320][ T5340] #0: ffff88801a3f10f8 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x247/0x320 [ 76.296398][ T5340] #1: ffff888042100428 (sb_writers#12){.+.+}-{0:0}, at: vfs_write+0x211/0xa90 [ 76.300624][ T5340] #2: ffff8880528f6280 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: udf_file_write_iter+0x6e/0x6c0 [ 76.305791][ T5340] #3: ffff8880528f60b0 (&ei->i_data_sem#2){++++}-{4:4}, at: udf_map_block+0x291/0x42a0 [ 76.310447][ T5340] #4: ffff8880403a7d28 (&sbi->s_alloc_mutex){+.+.}-{4:4}, at: udf_prealloc_blocks+0x8d0/0x10b0 [ 76.315027][ T5340] [ 76.315027][ T5340] stack backtrace: [ 76.317808][ T5340] CPU: 0 UID: 0 PID: 5340 Comm: syz.0.0 Not tainted 6.16.0-rc6-syzkaller-00281-gf4a40a4282f4 #0 PREEMPT(full) [ 76.317827][ T5340] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 76.317834][ T5340] Call Trace: [ 76.317843][ T5340] [ 76.317850][ T5340] dump_stack_lvl+0x189/0x250 [ 76.317872][ T5340] ? __pfx_dump_stack_lvl+0x10/0x10 [ 76.317886][ T5340] ? __pfx__printk+0x10/0x10 [ 76.317902][ T5340] ? print_lock_name+0xde/0x100 [ 76.317915][ T5340] print_deadlock_bug+0x28b/0x2a0 [ 76.317929][ T5340] validate_chain+0x1a3f/0x2140 [ 76.317941][ T5340] ? _raw_spin_unlock_irqrestore+0x85/0x110 [ 76.318006][ T5340] ? lockdep_hardirqs_on+0x9c/0x150 [ 76.318019][ T5340] __lock_acquire+0xab9/0xd20 [ 76.318031][ T5340] ? udf_free_blocks+0x9e2/0x17f0 [ 76.318043][ T5340] lock_acquire+0x120/0x360 [ 76.318053][ T5340] ? udf_free_blocks+0x9e2/0x17f0 [ 76.318067][ T5340] __mutex_lock+0x182/0xe80 [ 76.318077][ T5340] ? udf_free_blocks+0x9e2/0x17f0 [ 76.318089][ T5340] ? __pfx_folio_mark_accessed+0x10/0x10 [ 76.318105][ T5340] ? rcu_read_unlock_special+0x3fe/0x4c0 [ 76.318121][ T5340] ? udf_free_blocks+0x9e2/0x17f0 [ 76.318134][ T5340] ? __pfx___mutex_lock+0x10/0x10 [ 76.318148][ T5340] ? __pfx___might_resched+0x10/0x10 [ 76.318161][ T5340] udf_free_blocks+0x9e2/0x17f0 [ 76.318175][ T5340] ? bdev_getblk+0x7b/0x690 [ 76.318190][ T5340] ? udf_get_fileshortad+0x6e/0x1b0 [ 76.318203][ T5340] ? __pfx_udf_free_blocks+0x10/0x10 [ 76.318220][ T5340] udf_delete_aext+0x4df/0xbc0 [ 76.318233][ T5340] ? udf_get_fileshortad+0xcb/0x1b0 [ 76.318245][ T5340] ? __pfx_udf_delete_aext+0x10/0x10 [ 76.318261][ T5340] udf_prealloc_blocks+0xb7e/0x10b0 [ 76.318274][ T5340] ? udf_get_filelongad+0x6e/0x1b0 [ 76.318284][ T5340] ? __pfx_udf_new_block+0x10/0x10 [ 76.318297][ T5340] ? __pfx_udf_prealloc_blocks+0x10/0x10 [ 76.318313][ T5340] udf_map_block+0x1ddd/0x42a0 [ 76.318331][ T5340] ? __pfx_udf_map_block+0x10/0x10 [ 76.318355][ T5340] ? do_raw_spin_unlock+0x4d/0x240 [ 76.318370][ T5340] __udf_get_block+0x52/0x250 [ 76.318412][ T5340] __block_write_begin_int+0x6b2/0x1900 [ 76.318432][ T5340] ? folio_add_lru+0x1b2/0x3d0 [ 76.318446][ T5340] ? __pfx_udf_get_block+0x10/0x10 [ 76.318460][ T5340] ? __pfx___block_write_begin_int+0x10/0x10 [ 76.318477][ T5340] ? __pfx_udf_get_block+0x10/0x10 [ 76.318489][ T5340] block_write_begin+0x8a/0x120 [ 76.318502][ T5340] ? udf_write_begin+0x7d/0x260 [ 76.318513][ T5340] udf_write_begin+0x100/0x260 [ 76.318526][ T5340] generic_perform_write+0x2c7/0x910 [ 76.318538][ T5340] ? __pfx_generic_perform_write+0x10/0x10 [ 76.318547][ T5340] ? file_update_time+0x2da/0x490 [ 76.318558][ T5340] ? __generic_file_write_iter+0xf9/0x230 [ 76.318567][ T5340] ? udf_file_write_iter+0x1a3/0x6c0 [ 76.318579][ T5340] udf_file_write_iter+0x2d5/0x6c0 [ 76.318595][ T5340] vfs_write+0x548/0xa90 [ 76.318609][ T5340] ? __pfx_udf_file_write_iter+0x10/0x10 [ 76.318629][ T5340] ? __pfx_vfs_write+0x10/0x10 [ 76.318642][ T5340] ? __fget_files+0x2a/0x420 [ 76.318658][ T5340] ksys_write+0x145/0x250 [ 76.318671][ T5340] ? __pfx_ksys_write+0x10/0x10 [ 76.318688][ T5340] ? rcu_is_watching+0x15/0xb0 [ 76.318702][ T5340] ? do_syscall_64+0xbe/0x3b0 [ 76.318721][ T5340] do_syscall_64+0xfa/0x3b0 [ 76.318733][ T5340] ? lockdep_hardirqs_on+0x9c/0x150 [ 76.318747][ T5340] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 76.318760][ T5340] ? clear_bhb_loop+0x60/0xb0 [ 76.318773][ T5340] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 76.318787][ T5340] RIP: 0033:0x7f26fcb8e9a9 [ 76.318799][ T5340] 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 [ 76.318809][ T5340] RSP: 002b:00007f26fd934038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 76.318823][ T5340] RAX: ffffffffffffffda RBX: 00007f26fcdb5fa0 RCX: 00007f26fcb8e9a9 [ 76.318831][ T5340] RDX: 00000000000101bf RSI: 0000200000000380 RDI: 000000000000000a [ 76.318839][ T5340] RBP: 00007f26fcc10d69 R08: 0000000000000000 R09: 0000000000000000 [ 76.318846][ T5340] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 76.318851][ T5340] R13: 0000000000000000 R14: 00007f26fcdb5fa0 R15: 00007ffe5279e488 [ 76.318865][ T5340] [ 77.501782][ T4684] Bluetooth: hci0: command tx timeout [ 79.581397][ T4684] Bluetooth: hci0: command tx timeout [ 81.181463][ T5333] usb 5-1: unable to get BOS descriptor or descriptor too short [ 81.186252][ T5333] usb 5-1: unable to read config index 0 descriptor/start: -32 [ 81.190131][ T5333] usb 5-1: chopping to 0 config(s) [ 81.193431][ T5333] usb 5-1: can't read configurations, error -32 [ 81.321340][ T5333] usb 5-1: new high-speed USB device number 3 using dummy_hcd [ 81.451416][ T5333] usb 5-1: device descriptor read/64, error -32 [ 81.561440][ T5333] usb usb5-port1: attempt power cycle [ 81.661364][ T4684] Bluetooth: hci0: command tx timeout [ 81.901546][ T5333] usb 5-1: new high-speed USB device number 4 using dummy_hcd [ 81.921714][ T5333] usb 5-1: device descriptor read/8, error -32 [ 82.161390][ T5333] usb 5-1: new high-speed USB device number 5 using dummy_hcd [ 82.182078][ T5333] usb 5-1: device descriptor read/8, error -32 [ 82.291469][ T5333] usb usb5-port1: unable to enumerate USB device