program: r0 = socket$vsock_stream(0x28, 0x1, 0x0) getsockopt$sock_int(r0, 0x1, 0x2f, 0x0, &(0x7f00000040c0)) r1 = socket$nl_generic(0x10, 0x3, 0x10) r2 = socket$nl_route(0x10, 0x3, 0x0) r3 = socket$nl_route(0x10, 0x3, 0x0) ioctl$ifreq_SIOCGIFINDEX_batadv_mesh(r3, 0x8933, &(0x7f0000000040)={'batadv0\x00', 0x0}) r5 = syz_open_dev$evdev(&(0x7f0000000240), 0x1, 0x2) syz_usb_disconnect(r5) syz_usb_connect(0x4, 0x24, &(0x7f00000002c0)=ANY=[], 0x0) ioctl$EVIOCRMFF(r5, 0x40085507, &(0x7f0000000280)=0x80000000) sendmsg$nl_route(r2, &(0x7f00000000c0)={0x0, 0x0, &(0x7f0000000340)={&(0x7f0000000080)=@setlink={0x3c, 0x13, 0x1, 0x0, 0x0, {}, [@IFLA_MASTER={0x8, 0xa, r4}, @IFLA_ALT_IFNAME={0x14, 0x35, 'dummy0\x00'}]}, 0x3c}}, 0x0) r6 = socket$pppl2tp(0x18, 0x1, 0x1) ioctl$SIOCSIFMTU(r6, 0x8922, &(0x7f0000000080)={'dummy0\x00'}) sendmsg$nl_generic(r1, &(0x7f0000000000)={0x0, 0x0, &(0x7f0000000180)={&(0x7f00000004c0)={0x2c, 0x3e, 0x9, 0x0, 0x800, {0x3}, [@typed={0x4}, @nested={0x14, 0x1, 0x0, 0x1, [@nested={0x10, 0x10, 0x0, 0x1, [@nested={0xc, 0x7, 0x0, 0x1, [@typed={0x8, 0x26, 0x0, 0x0, @pid}]}]}]}]}, 0x2c}, 0x1, 0x0, 0x0, 0x4080}, 0x0) r7 = syz_mount_image$hfsplus(&(0x7f0000000600), &(0x7f0000000040)='./file1\x00', 0x0, &(0x7f0000000080)={[{@part={'part', 0x3d, 0x40}}, {@nodecompose}, {@part={'part', 0x3d, 0x7}}, {@part={'part', 0x3d, 0xc}}, {@uid}, {@barrier}, {@nls={'nls', 0x3d, 'macinuit'}}, {@gid={'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r8, &(0x7f0000000100)=""/154, 0x9a) ioctl$AUTOFS_IOC_FAIL(r7, 0x9361, 0x2) unlinkat(r8, &(0x7f00000003c0)='./file1\x00', 0x0) [ 86.702650][ T45] Bluetooth: hci0: command tx timeout [ 87.027741][ T5361] batman_adv: batadv0: Adding interface: dummy0 [ 87.030249][ T5361] batman_adv: batadv0: The MTU of interface dummy0 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem. [ 87.042031][ T5361] batman_adv: batadv0: Interface activated: dummy0 [ 87.052548][ T5361] batadv0: mtu less than device minimum [ 87.055774][ T5361] batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) [ 87.061265][ T5361] batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) [ 87.066864][ T5361] batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) [ 87.072046][ T5361] batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) [ 87.077320][ T5361] batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) [ 87.082099][ T5361] batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) [ 87.087466][ T5361] batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) [ 87.092517][ T5361] batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) [ 87.098011][ T5361] batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-320) [ 87.122542][ T5362] loop0: detected capacity change from 0 to 1024 [ 87.179758][ T5361] hfsplus: invalid extended attribute record [ 87.183010][ T5361] [ 87.184092][ T5361] ============================================ [ 87.186578][ T5361] WARNING: possible recursive locking detected [ 87.188959][ T5361] syzkaller #0 Not tainted [ 87.190813][ T5361] -------------------------------------------- [ 87.193176][ T5361] syz.0.0/5361 is trying to acquire lock: [ 87.195447][ T5361] ffff888052e7d548 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_get_block+0x39e/0x1530 [ 87.199701][ T5361] [ 87.199701][ T5361] but task is already holding lock: [ 87.202682][ T5361] ffff888052e7e988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_truncate+0x294/0xb40 [ 87.207325][ T5361] [ 87.207325][ T5361] other info that might help us debug this: [ 87.210634][ T5361] Possible unsafe locking scenario: [ 87.210634][ T5361] [ 87.213678][ T5361] CPU0 [ 87.215083][ T5361] ---- [ 87.216447][ T5361] lock(&HFSPLUS_I(inode)->extents_lock); [ 87.218722][ T5361] lock(&HFSPLUS_I(inode)->extents_lock); [ 87.221332][ T5361] [ 87.221332][ T5361] *** DEADLOCK *** [ 87.221332][ T5361] [ 87.225442][ T5361] May be due to missing lock nesting notation [ 87.225442][ T5361] [ 87.229713][ T5361] 6 locks held by syz.0.0/5361: [ 87.232190][ T5361] #0: ffff888011562428 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 [ 87.236795][ T5361] #1: ffff888052e7ddf8 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: do_unlinkat+0x1c7/0x560 [ 87.241075][ T5361] #2: ffff888052e7eb78 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: vfs_unlink+0xf2/0x650 [ 87.245663][ T5361] #3: ffff8880457bc198 (&sbi->vh_mutex){+.+.}-{4:4}, at: hfsplus_unlink+0x160/0x730 [ 87.249800][ T5361] #4: ffff888052e7e988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_truncate+0x294/0xb40 [ 87.254606][ T5361] #5: ffff8880457bc0f8 (&sbi->alloc_mutex){+.+.}-{4:4}, at: hfsplus_block_free+0xbe/0x550 [ 87.258591][ T5361] [ 87.258591][ T5361] stack backtrace: [ 87.260949][ T5361] CPU: 0 UID: 0 PID: 5361 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 87.260971][ T5361] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 87.260980][ T5361] Call Trace: [ 87.260987][ T5361] [ 87.260993][ T5361] dump_stack_lvl+0x189/0x250 [ 87.261012][ T5361] ? __pfx_dump_stack_lvl+0x10/0x10 [ 87.261026][ T5361] ? __pfx__printk+0x10/0x10 [ 87.261042][ T5361] ? print_lock_name+0xde/0x100 [ 87.261059][ T5361] print_deadlock_bug+0x28b/0x2a0 [ 87.261072][ T5361] validate_chain+0x1a3f/0x2140 [ 87.261084][ T5361] ? lock_release+0x4b/0x3e0 [ 87.261128][ T5361] ? look_up_lock_class+0x74/0x170 [ 87.261185][ T5361] ? register_lock_class+0x51/0x320 [ 87.261204][ T5361] __lock_acquire+0xab9/0xd20 [ 87.261221][ T5361] ? hfsplus_get_block+0x39e/0x1530 [ 87.261232][ T5361] lock_acquire+0x120/0x360 [ 87.261247][ T5361] ? hfsplus_get_block+0x39e/0x1530 [ 87.261259][ T5361] ? stack_trace_save+0x9c/0xe0 [ 87.261273][ T5361] ? __pfx_hlock_conflict+0x10/0x10 [ 87.261287][ T5361] __mutex_lock+0x187/0x1350 [ 87.261303][ T5361] ? hfsplus_get_block+0x39e/0x1530 [ 87.261315][ T5361] ? lockdep_unlock+0x89/0x120 [ 87.261329][ T5361] ? validate_chain+0x897/0x2140 [ 87.261339][ T5361] ? hfsplus_get_block+0x39e/0x1530 [ 87.261350][ T5361] ? __pfx___mutex_lock+0x10/0x10 [ 87.261379][ T5361] hfsplus_get_block+0x39e/0x1530 [ 87.261394][ T5361] ? __pfx_hfsplus_get_block+0x10/0x10 [ 87.261407][ T5361] ? do_raw_spin_unlock+0x4d/0x240 [ 87.261422][ T5361] ? _raw_spin_unlock+0x28/0x50 [ 87.261437][ T5361] block_read_full_folio+0x29f/0x830 [ 87.261449][ T5361] ? __pfx_hfsplus_get_block+0x10/0x10 [ 87.261460][ T5361] filemap_read_folio+0x114/0x380 [ 87.261476][ T5361] ? __pfx_hfsplus_read_folio+0x10/0x10 [ 87.261486][ T5361] ? __pfx_filemap_read_folio+0x10/0x10 [ 87.261502][ T5361] ? filemap_add_folio+0x1af/0x270 [ 87.261516][ T5361] do_read_cache_folio+0x350/0x590 [ 87.261527][ T5361] ? __pfx_hfsplus_read_folio+0x10/0x10 [ 87.261538][ T5361] read_cache_page+0x5d/0x170 [ 87.261548][ T5361] hfsplus_block_free+0x121/0x550 [ 87.261565][ T5361] hfsplus_free_extents+0x10d/0xa60 [ 87.261578][ T5361] hfsplus_file_truncate+0x736/0xb40 [ 87.261592][ T5361] ? __pfx_hfsplus_file_truncate+0x10/0x10 [ 87.261605][ T5361] ? __pfx___mutex_lock+0x10/0x10 [ 87.261620][ T5361] ? __lock_acquire+0xab9/0xd20 [ 87.261636][ T5361] hfsplus_delete_inode+0x180/0x230 [ 87.261647][ T5361] hfsplus_unlink+0x4e3/0x730 [ 87.261659][ T5361] ? vfs_unlink+0xf2/0x650 [ 87.261673][ T5361] ? __pfx_hfsplus_unlink+0x10/0x10 [ 87.261686][ T5361] ? __pfx_down_write+0x10/0x10 [ 87.261703][ T5361] ? bpf_lsm_inode_unlink+0x9/0x20 [ 87.261719][ T5361] vfs_unlink+0x391/0x650 [ 87.261734][ T5361] do_unlinkat+0x345/0x560 [ 87.261747][ T5361] ? __pfx_do_unlinkat+0x10/0x10 [ 87.261760][ T5361] ? getname_flags+0x1e5/0x540 [ 87.261775][ T5361] __x64_sys_unlinkat+0xd3/0xf0 [ 87.261788][ T5361] do_syscall_64+0xfa/0x3b0 [ 87.261803][ T5361] ? lockdep_hardirqs_on+0x9c/0x150 [ 87.261816][ T5361] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.261827][ T5361] ? clear_bhb_loop+0x60/0xb0 [ 87.261839][ T5361] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.261850][ T5361] RIP: 0033:0x7f58e718ebe9 [ 87.261862][ T5361] 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 [ 87.261872][ T5361] RSP: 002b:00007f58e7f29038 EFLAGS: 00000246 ORIG_RAX: 0000000000000107 [ 87.261885][ T5361] RAX: ffffffffffffffda RBX: 00007f58e73b5fa0 RCX: 00007f58e718ebe9 [ 87.261893][ T5361] RDX: 0000000000000000 RSI: 00002000000003c0 RDI: 000000000000000a [ 87.261900][ T5361] RBP: 00007f58e7211e19 R08: 0000000000000000 R09: 0000000000000000 [ 87.261906][ T5361] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 87.261913][ T5361] R13: 00007f58e73b6038 R14: 00007f58e73b5fa0 R15: 00007fffe43679e8 [ 87.261923][ T5361] [ 87.452675][ T5361] hfsplus: unable to mark blocks free: error -5 [ 87.456287][ T5361] hfsplus: can't free extent