program: r0 = socket$nl_route(0x10, 0x3, 0x0) sendmsg$nl_route(r0, &(0x7f0000000040)={0x0, 0x0, &(0x7f0000000080)={&(0x7f00000000c0)=ANY=[@ANYBLOB="240000006800010009000000000000000a00000000000000080001000200000004000b"], 0x24}}, 0x0) r1 = socket$inet6_sctp(0xa, 0x801, 0x84) r2 = add_key$keyring(&(0x7f0000000080), &(0x7f0000001100)={'syz', 0x3}, 0x0, 0x0, 0xfffffffffffffffe) add_key(&(0x7f0000000040)='asymmetric\x00', 0x0, &(0x7f0000000300)="300e308002", 0x1001, r2) ioctl$sock_SIOCGIFINDEX(r1, 0x8933, &(0x7f0000000040)={'ipvlan1\x00', 0x0}) r4 = socket$inet6_mptcp(0xa, 0x1, 0x106) ioctl$sock_inet6_SIOCSIFADDR(r4, 0x8916, &(0x7f0000000100)={@private0={0xfc, 0x0, '\x00', 0x1}, 0x0, r3}) r5 = socket$nl_route(0x10, 0x3, 0x0) r6 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000040), 0x802, 0x0) ioctl$UI_ABS_SETUP(r6, 0x401c5504, &(0x7f0000000340)={0x400000100002f}) syz_mount_image$hfsplus(&(0x7f0000000040), &(0x7f0000000080)='./file1\x00', 0x400, &(0x7f0000000140)=ANY=[], 0x1, 0x694, &(0x7f0000001100)="$eJzs3U1sHGf9B/DvbnbX3vz/Sp02SQOqRNRIBRGROLGSYi4NCKFIVKgqB8TRSpzGyiatHBc5EYLwfuDCoXeKRG5cQOIeVM7AqVcfKyFx6SmAxKKZnbXXr9l1Yq8tPp9odp5nnpd5nt/M7OzOKnKA/1nXzqXxOLVcO/fmcpFfeTTTWXk0c6efTjKRpJ40eqvU7ia1j5Kr6S35TLGx6q623X4+WJh9++NPVz7p5RrVUtav79Rukyv1LTY+rJacSXKkWj+Ddf1d39Bfa+TuaqszLAJ2th84GLdmku463z21VvJUw1+3wIFVK++bm6/5qeRoksnqc0Dvrti7Zx9qD8c9AAAAANgHL/yy/Ap/bNzjAAAAAAAAAA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x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x1, 0x0, 0x9, 0x0, 0x0, 0x0, 0x1]}, 0x45c) ioctl$UI_SET_EVBIT(r6, 0x40045564, 0x3) ioctl$UI_DEV_CREATE(r6, 0x5501) r9 = syz_init_net_socket$netrom(0x6, 0x5, 0x0) setsockopt$netrom_NETROM_T4(r9, 0x103, 0x6, &(0x7f0000000040)=0x4, 0x4) ioctl$ifreq_SIOCGIFINDEX_wireguard(r5, 0x8933, &(0x7f0000002140)={'wg2\x00', 0x0}) sendmsg$nl_route(r5, &(0x7f0000000380)={0x0, 0x0, &(0x7f0000000240)={&(0x7f0000000400)=ANY=[@ANYBLOB="40c2c10938497d61e90000006800010000000000000000000a000200000000000600070004000000080005000000000000", @ANYRES32=r10, @ANYBLOB="180008801400030000000000000000000000000000000001"], 0x40}, 0x1, 0x0, 0x0, 0x408c0}, 0x48040) r11 = creat(&(0x7f0000000080)='./file1\x00', 0x0) pipe(&(0x7f0000000000)={0xffffffffffffffff}) r13 = openat$sw_sync(0xffffffffffffff9c, &(0x7f0000000000), 0x0, 0x0) ioctl$SW_SYNC_IOC_CREATE_FENCE(r13, 0xc0285700, 0x0) name_to_handle_at(r12, &(0x7f0000000180)='./file1\x00', &(0x7f0000000080)=@FILEID_UDF_WITH_PARENT={0x14}, &(0x7f00000000c0), 0x1200) fcntl$setstatus(r11, 0x4, 0x6000) io_setup(0x200, &(0x7f0000000140)=0x0) io_submit(r14, 0x3b, &(0x7f0000000540)=[&(0x7f00000000c0)={0x25, 0x0, 0x20, 0x1, 0x0, r11, &(0x7f0000000000), 0x4000}]) [ 68.856346][ T5305] Bluetooth: hci0: command tx timeout [ 68.941220][ T5319] loop0: detected capacity change from 0 to 1024 [ 68.986650][ T5319] [ 68.987618][ T5319] ====================================================== [ 68.990209][ T5319] WARNING: possible circular locking dependency detected [ 68.992833][ T5319] 6.12.0-syzkaller-12113-gbcc8eda6d349 #0 Not tainted [ 68.995446][ T5319] ------------------------------------------------------ [ 68.998082][ T5319] syz.0.0/5319 is trying to acquire lock: [ 69.000281][ T5319] ffff8880436440b0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfsplus_find_init+0x14a/0x1c0 [ 69.004050][ T5319] [ 69.004050][ T5319] but task is already holding lock: [ 69.006940][ T5319] ffff888040bdf048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_truncate+0x30a/0xc70 [ 69.011244][ T5319] [ 69.011244][ T5319] which lock already depends on the new lock. [ 69.011244][ T5319] [ 69.015164][ T5319] [ 69.015164][ T5319] the existing dependency chain (in reverse order) is: [ 69.018455][ T5319] [ 69.018455][ T5319] -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}: [ 69.021878][ T5319] lock_acquire+0x1ed/0x550 [ 69.023878][ T5319] __mutex_lock+0x1ac/0xee0 [ 69.025841][ T5319] hfsplus_file_extend+0x21b/0x1b70 [ 69.028036][ T5319] hfsplus_bmap_reserve+0x105/0x4e0 [ 69.030231][ T5319] __hfsplus_ext_write_extent+0x2a4/0x5c0 [ 69.032587][ T5319] __hfsplus_ext_cache_extent+0x84/0xe10 [ 69.034913][ T5319] hfsplus_file_extend+0x48c/0x1b70 [ 69.037046][ T5319] hfsplus_get_block+0x406/0x14f0 [ 69.038951][ T5319] __block_write_begin_int+0x50c/0x1a70 [ 69.041044][ T5319] cont_write_begin+0x6e2/0x9d0 [ 69.043008][ T5319] hfsplus_write_begin+0x68/0xb0 [ 69.045081][ T5319] generic_perform_write+0x344/0x6d0 [ 69.047321][ T5319] generic_file_write_iter+0xae/0x310 [ 69.049591][ T5319] aio_write+0x56b/0x7c0 [ 69.051364][ T5319] io_submit_one+0x8a7/0x18a0 [ 69.053306][ T5319] __se_sys_io_submit+0x171/0x2e0 [ 69.055379][ T5319] do_syscall_64+0xf3/0x230 [ 69.057349][ T5319] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 69.059808][ T5319] [ 69.059808][ T5319] -> #0 (&tree->tree_lock/1){+.+.}-{4:4}: [ 69.062627][ T5319] validate_chain+0x18ef/0x5920 [ 69.064608][ T5319] __lock_acquire+0x1397/0x2100 [ 69.066601][ T5319] lock_acquire+0x1ed/0x550 [ 69.068589][ T5319] __mutex_lock+0x1ac/0xee0 [ 69.070497][ T5319] hfsplus_find_init+0x14a/0x1c0 [ 69.072506][ T5319] hfsplus_file_truncate+0x45f/0xc70 [ 69.074651][ T5319] hfsplus_setattr+0x1bd/0x270 [ 69.076517][ T5319] notify_change+0xbca/0xe90 [ 69.078380][ T5319] do_truncate+0x220/0x310 [ 69.080180][ T5319] path_openat+0x2e1e/0x3590 [ 69.082073][ T5319] do_filp_open+0x27f/0x4e0 [ 69.083894][ T5319] do_sys_openat2+0x13e/0x1d0 [ 69.085872][ T5319] __x64_sys_creat+0x123/0x170 [ 69.087846][ T5319] do_syscall_64+0xf3/0x230 [ 69.089666][ T5319] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 69.091990][ T5319] [ 69.091990][ T5319] other info that might help us debug this: [ 69.091990][ T5319] [ 69.095898][ T5319] Possible unsafe locking scenario: [ 69.095898][ T5319] [ 69.098665][ T5319] CPU0 CPU1 [ 69.100601][ T5319] ---- ---- [ 69.102561][ T5319] lock(&HFSPLUS_I(inode)->extents_lock); [ 69.104742][ T5319] lock(&tree->tree_lock/1); [ 69.107475][ T5319] lock(&HFSPLUS_I(inode)->extents_lock); [ 69.110525][ T5319] lock(&tree->tree_lock/1); [ 69.112355][ T5319] [ 69.112355][ T5319] *** DEADLOCK *** [ 69.112355][ T5319] [ 69.115445][ T5319] 3 locks held by syz.0.0/5319: [ 69.117312][ T5319] #0: ffff88801e350420 (sb_writers#11){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 [ 69.120753][ T5319] #1: ffff888040bdf238 (&sb->s_type->i_mutex_key#19){+.+.}-{4:4}, at: do_truncate+0x20c/0x310 [ 69.124724][ T5319] #2: ffff888040bdf048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_truncate+0x30a/0xc70 [ 69.129131][ T5319] [ 69.129131][ T5319] stack backtrace: [ 69.131341][ T5319] CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.12.0-syzkaller-12113-gbcc8eda6d349 #0 [ 69.134974][ T5319] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 69.138818][ T5319] Call Trace: [ 69.140067][ T5319] [ 69.141169][ T5319] dump_stack_lvl+0x241/0x360 [ 69.142965][ T5319] ? __pfx_dump_stack_lvl+0x10/0x10 [ 69.144882][ T5319] ? __pfx__printk+0x10/0x10 [ 69.146635][ T5319] print_circular_bug+0x13a/0x1b0 [ 69.148537][ T5319] check_noncircular+0x36a/0x4a0 [ 69.150423][ T5319] ? __pfx_check_noncircular+0x10/0x10 [ 69.152418][ T5319] ? lockdep_lock+0x123/0x2b0 [ 69.154189][ T5319] validate_chain+0x18ef/0x5920 [ 69.156200][ T5319] ? __pfx_validate_chain+0x10/0x10 [ 69.158177][ T5319] ? mark_lock+0x9a/0x360 [ 69.159783][ T5319] ? lockdep_hardirqs_on_prepare+0x43d/0x780 [ 69.162005][ T5319] ? mark_lock+0x9a/0x360 [ 69.163611][ T5319] __lock_acquire+0x1397/0x2100 [ 69.165479][ T5319] lock_acquire+0x1ed/0x550 [ 69.167234][ T5319] ? hfsplus_find_init+0x14a/0x1c0 [ 69.169145][ T5319] ? __pfx_lock_acquire+0x10/0x10 [ 69.171026][ T5319] ? hfsplus_find_init+0x85/0x1c0 [ 69.172905][ T5319] ? hfsplus_file_truncate+0x45f/0xc70 [ 69.174924][ T5319] ? __pfx___might_resched+0x10/0x10 [ 69.176918][ T5319] ? do_filp_open+0x27f/0x4e0 [ 69.178700][ T5319] ? do_sys_openat2+0x13e/0x1d0 [ 69.180542][ T5319] ? __x64_sys_creat+0x123/0x170 [ 69.182487][ T5319] ? do_syscall_64+0xf3/0x230 [ 69.184222][ T5319] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 69.186563][ T5319] __mutex_lock+0x1ac/0xee0 [ 69.188294][ T5319] ? hfsplus_find_init+0x14a/0x1c0 [ 69.190218][ T5319] ? hfsplus_find_init+0x14a/0x1c0 [ 69.192106][ T5319] ? __pfx___mutex_lock+0x10/0x10 [ 69.194011][ T5319] ? rcu_is_watching+0x15/0xb0 [ 69.195810][ T5319] ? __kmalloc_noprof+0x2a5/0x4c0 [ 69.197820][ T5319] ? hfsplus_find_init+0x85/0x1c0 [ 69.199839][ T5319] hfsplus_find_init+0x14a/0x1c0 [ 69.201750][ T5319] hfsplus_file_truncate+0x45f/0xc70 [ 69.203726][ T5319] ? __pfx___up_read+0x10/0x10 [ 69.205605][ T5319] ? __pfx_hfsplus_file_truncate+0x10/0x10 [ 69.207985][ T5319] ? unmap_mapping_range+0xf8/0x290 [ 69.210070][ T5319] ? __pfx_unmap_mapping_range+0x10/0x10 [ 69.212280][ T5319] ? current_time+0x2a4/0x3c0 [ 69.214068][ T5319] ? truncate_setsize+0xcf/0xf0 [ 69.215896][ T5319] hfsplus_setattr+0x1bd/0x270 [ 69.217773][ T5319] ? __pfx_hfsplus_setattr+0x10/0x10 [ 69.219759][ T5319] notify_change+0xbca/0xe90 [ 69.221572][ T5319] do_truncate+0x220/0x310 [ 69.223284][ T5319] ? __pfx_do_truncate+0x10/0x10 [ 69.225193][ T5319] ? apparmor_file_truncate+0x297/0x350 [ 69.227420][ T5319] path_openat+0x2e1e/0x3590 [ 69.229221][ T5319] ? __pfx_path_openat+0x10/0x10 [ 69.231161][ T5319] do_filp_open+0x27f/0x4e0 [ 69.232901][ T5319] ? __pfx_do_filp_open+0x10/0x10 [ 69.234859][ T5319] ? do_raw_spin_lock+0x14f/0x370 [ 69.236671][ T5319] do_sys_openat2+0x13e/0x1d0 [ 69.238439][ T5319] ? __pfx_do_sys_openat2+0x10/0x10 [ 69.240228][ T5319] ? __rseq_handle_notify_resume+0x34d/0x14e0 [ 69.242383][ T5319] __x64_sys_creat+0x123/0x170 [ 69.244172][ T5319] ? __pfx___x64_sys_creat+0x10/0x10 [ 69.246209][ T5319] ? do_syscall_64+0x100/0x230 [ 69.248021][ T5319] ? do_syscall_64+0xb6/0x230 [ 69.249793][ T5319] do_syscall_64+0xf3/0x230 [ 69.251529][ T5319] ? clear_bhb_loop+0x35/0x90 [ 69.253328][ T5319] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 69.255554][ T5319] RIP: 0033:0x7f62ec180849 [ 69.257286][ T5319] 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 [ 69.264797][ T5319] RSP: 002b:00007f62ecf36058 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 69.268069][ T5319] RAX: ffffffffffffffda RBX: 00007f62ec345fa0 RCX: 00007f62ec180849 [ 69.271419][ T5319] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000080 [ 69.274505][ T5319] RBP: 00007f62ec1f3986 R08: 0000000000000000 R09: 0000000000000000 [ 69.277633][ T5319] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 69.279952][ T5319] R13: 0000000000000000 R14: 00007f62ec345fa0 R15: 00007ffc36ab2ce8 [ 69.282714][ T5319]