program: 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/bNzjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgMOk9/f/i1W51PvpM6n1//5/q9qWKn2oPR73AAAAAAAAAABgdN/8/w0bPvckT7KcY/18t1b+5v9qmTlRvv5f3s+9zGcx57OcuSxlKYu5mGSqLG+Wr63luaWlxYtDtLy02jIDLS8NOYP27icPAAAAAAAAAIdFY/QmP861td//AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgIKglR3qrcjnRT0+l3kgymaRV1HuY/LWfPpB+/afBXPff3dKmao/3c0wAAAAwJi88yZMs51g/362V3/lPld/7J/N+7mYpC1lKJ/O5UT4L6H3rr688mumsPJq5Uyyb+/3qP0YaRtljes8ett7z6bJGOzezUG45n+t5N53cSL1sWTjdH8/W4/pRMabaG5UhR3ajWhcz/1WaI81qN2pD15wqI1KMqBeR6aptEY3jO0dixKPT31M/9hdTX33yc+J5xny5t3r9t711MZ+fjxSTvbYxEpcGzr5TK6ntEInk83/83Xdude7enrh579zBmdIIJgaeoG2MxMxAJF7e+ZxIM1Ukbh3WSAyaLiNxcjV/Ld/It3MuZ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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcEhdOzdRpc5PF68rj2Y6xdJPr1Ysq9WT1L6f1D5Krqa3ZGqgu9p2+/lgYfbtjz9d+aSXa1RLWb++rl1zN7N4WC05k+RItR40+Qz9Xa/WuxpZqbY6wyJgZ/uBg3H7bwAAAP//2wMQAg==") r0 = openat$drirender128(0xffffffffffffff9c, &(0x7f0000000140), 0x0, 0x0) ioctl$DRM_IOCTL_MODE_GETFB2(0xffffffffffffffff, 0xc06864ce, &(0x7f0000000180)={0x0, 0x8, 0x9, 0x7, 0x2, [0x0, 0x0, 0x0, 0x0], [0x8, 0x4, 0x8, 0x6], [0xed1, 0x6, 0xd4c0, 0x9], [0x6, 0xffffffffffffffff, 0xffffffff80000000, 0x7]}) ioctl$DRM_IOCTL_GEM_CLOSE(r0, 0x40086409, &(0x7f0000000240)={r1}) r2 = creat(&(0x7f0000000000)='./bus\x00', 0x0) syz_usb_connect(0x0, 0x24, &(0x7f0000001140)=ANY=[@ANYBLOB="12010000c5aa6d08cd0c380003990102030109021200010000c7000904"], 0x0) r3 = syz_open_dev$evdev(&(0x7f0000000000), 0x4, 0x0) ioctl$EVIOCSKEYCODE_V2(r3, 0x40284504, &(0x7f0000001ec0)={0x1b, 0xb, 0x0, 0x1c, "57ee588c78d991b21ac92b7167b64160c0735df2a1b4b2238dd42bac377bd681"}) io_setup(0x202, &(0x7f0000000200)=0x0) io_submit(r4, 0x20000000000002a0, &(0x7f0000000540)=[&(0x7f00000000c0)={0x25, 0xe7030000, 0x0, 0x1, 0x0, r2, &(0x7f0000000000), 0x70000}]) creat(&(0x7f0000000100)='./file1\x00', 0x0) setsockopt$pppl2tp_PPPOL2TP_SO_SENDSEQ(r2, 0x111, 0x3, 0x0, 0x4) [ 87.652108][ T4700] Bluetooth: hci0: command tx timeout [ 87.866271][ T5355] loop0: detected capacity change from 0 to 1024 [ 88.250568][ T5353] usb 5-1: new high-speed USB device number 2 using dummy_hcd [ 88.420133][ T5353] usb 5-1: Using ep0 maxpacket: 8 [ 88.426098][ T5353] usb 5-1: config 0 has an invalid interface number: 62 but max is 0 [ 88.430946][ T5353] usb 5-1: config 0 has no interface number 0 [ 88.434167][ T5353] usb 5-1: too many endpoints for config 0 interface 62 altsetting 159: 104, using maximum allowed: 30 [ 88.439383][ T5353] usb 5-1: config 0 interface 62 altsetting 159 has 0 endpoint descriptors, different from the interface descriptor's value: 104 [ 88.470610][ T5353] usb 5-1: config 0 interface 62 has no altsetting 0 [ 88.520625][ T5353] usb 5-1: New USB device found, idVendor=0ccd, idProduct=0038, bcdDevice=99.03 [ 88.525361][ T5353] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 88.541687][ T5353] usb 5-1: Product: syz [ 88.558867][ T5353] usb 5-1: Manufacturer: syz [ 88.561956][ T5353] usb 5-1: SerialNumber: syz [ 88.594564][ T5353] usb 5-1: config 0 descriptor?? [ 88.866973][ T5355] [ 88.868690][ T5355] ====================================================== [ 88.884429][ T5355] WARNING: possible circular locking dependency detected [ 88.888344][ T5355] 6.16.0-syzkaller-11579-g35a813e010b9 #0 Not tainted [ 88.904125][ T5355] ------------------------------------------------------ [ 88.907653][ T5355] syz.0.0/5355 is trying to acquire lock: [ 88.923363][ T5355] ffff8880436880b0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfsplus_find_init+0x15a/0x1d0 [ 88.949567][ T5355] [ 88.949567][ T5355] but task is already holding lock: [ 88.955750][ T5355] ffff888052b67048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_truncate+0x294/0xb40 [ 88.963341][ T5355] [ 88.963341][ T5355] which lock already depends on the new lock. [ 88.963341][ T5355] [ 88.972727][ T5355] [ 88.972727][ T5355] the existing dependency chain (in reverse order) is: [ 88.985291][ T5355] [ 88.985291][ T5355] -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}: [ 88.991969][ T5355] lock_acquire+0x120/0x360 [ 88.994818][ T5355] __mutex_lock+0x187/0x1360 [ 88.997606][ T5355] hfsplus_file_extend+0x1fc/0x1990 [ 89.000744][ T5355] hfsplus_bmap_reserve+0x122/0x500 [ 89.024254][ T5355] __hfsplus_ext_write_extent+0x28d/0x5b0 [ 89.028695][ T5355] __hfsplus_ext_cache_extent+0x89/0xe30 [ 89.031642][ T5355] hfsplus_file_extend+0x444/0x1990 [ 89.037221][ T5355] hfsplus_get_block+0x411/0x1530 [ 89.040286][ T5355] __block_write_begin_int+0x6b2/0x1900 [ 89.063862][ T5355] cont_write_begin+0x789/0xb50 [ 89.067005][ T5355] hfsplus_write_begin+0x66/0xb0 [ 89.069430][ T5355] generic_perform_write+0x2c2/0x900 [ 89.092020][ T5355] generic_file_write_iter+0x117/0x550 [ 89.094930][ T5355] aio_write+0x535/0x7a0 [ 89.097779][ T5355] io_submit_one+0x78b/0x1310 [ 89.100364][ T5355] __se_sys_io_submit+0x185/0x2f0 [ 89.123488][ T5355] do_syscall_64+0xfa/0x3b0 [ 89.125947][ T5355] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 89.128921][ T5355] [ 89.128921][ T5355] -> #0 (&tree->tree_lock/1){+.+.}-{4:4}: [ 89.155737][ T5355] validate_chain+0xb9b/0x2140 [ 89.158180][ T5355] __lock_acquire+0xab9/0xd20 [ 89.160700][ T5355] lock_acquire+0x120/0x360 [ 89.173146][ T5355] __mutex_lock+0x187/0x1360 [ 89.175724][ T5355] hfsplus_find_init+0x15a/0x1d0 [ 89.192737][ T5355] hfsplus_file_truncate+0x383/0xb40 [ 89.212947][ T5355] hfsplus_setattr+0x1c4/0x270 [ 89.219015][ T5355] notify_change+0xb33/0xe40 [ 89.224210][ T5355] do_truncate+0x1a4/0x220 [ 89.230321][ T5355] path_openat+0x306c/0x3830 [ 89.239688][ T5355] do_filp_open+0x1fa/0x410 [ 89.244551][ T5355] do_sys_openat2+0x121/0x1c0 [ 89.248275][ T5355] __x64_sys_creat+0x8f/0xc0 [ 89.275989][ T5355] do_syscall_64+0xfa/0x3b0 [ 89.278517][ T5355] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 89.292888][ T5355] [ 89.292888][ T5355] other info that might help us debug this: [ 89.292888][ T5355] [ 89.296976][ T5355] Possible unsafe locking scenario: [ 89.296976][ T5355] [ 89.300001][ T5355] CPU0 CPU1 [ 89.319412][ T5355] ---- ---- [ 89.323303][ T5355] lock(&HFSPLUS_I(inode)->extents_lock); [ 89.325958][ T5355] lock(&tree->tree_lock/1); [ 89.329162][ T5355] lock(&HFSPLUS_I(inode)->extents_lock); [ 89.355716][ T5355] lock(&tree->tree_lock/1); [ 89.357715][ T5355] [ 89.357715][ T5355] *** DEADLOCK *** [ 89.357715][ T5355] [ 89.361273][ T5355] 3 locks held by syz.0.0/5355: [ 89.382279][ T5355] #0: ffff88803667a428 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 [ 89.386225][ T5355] #1: ffff888052b67238 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: do_truncate+0x171/0x220 [ 89.390416][ T5355] #2: ffff888052b67048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_truncate+0x294/0xb40 [ 89.405940][ T5355] [ 89.405940][ T5355] stack backtrace: [ 89.408651][ T5355] CPU: 0 UID: 0 PID: 5355 Comm: syz.0.0 Not tainted 6.16.0-syzkaller-11579-g35a813e010b9 #0 PREEMPT(full) [ 89.408670][ T5355] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 89.408678][ T5355] Call Trace: [ 89.408686][ T5355] [ 89.408692][ T5355] dump_stack_lvl+0x189/0x250 [ 89.408713][ T5355] ? __pfx_dump_stack_lvl+0x10/0x10 [ 89.408726][ T5355] ? __pfx__printk+0x10/0x10 [ 89.408741][ T5355] ? print_lock_name+0xde/0x100 [ 89.408756][ T5355] print_circular_bug+0x2ee/0x310 [ 89.408769][ T5355] check_noncircular+0x134/0x160 [ 89.408781][ T5355] validate_chain+0xb9b/0x2140 [ 89.408793][ T5355] ? _raw_spin_unlock_irqrestore+0xad/0x110 [ 89.408804][ T5355] ? __pfx__raw_spin_unlock_irqrestore+0x10/0x10 [ 89.408818][ T5355] __lock_acquire+0xab9/0xd20 [ 89.408835][ T5355] ? hfsplus_find_init+0x15a/0x1d0 [ 89.408850][ T5355] lock_acquire+0x120/0x360 [ 89.408864][ T5355] ? hfsplus_find_init+0x15a/0x1d0 [ 89.408879][ T5355] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 89.408893][ T5355] __mutex_lock+0x187/0x1360 [ 89.408905][ T5355] ? hfsplus_find_init+0x15a/0x1d0 [ 89.408917][ T5355] ? hfsplus_find_init+0x15a/0x1d0 [ 89.408930][ T5355] ? __pfx___mutex_lock+0x10/0x10 [ 89.408942][ T5355] ? rcu_is_watching+0x15/0xb0 [ 89.408952][ T5355] ? __kmalloc_noprof+0x29b/0x4f0 [ 89.408962][ T5355] ? hfsplus_find_init+0x8c/0x1d0 [ 89.408976][ T5355] hfsplus_find_init+0x15a/0x1d0 [ 89.408989][ T5355] hfsplus_file_truncate+0x383/0xb40 [ 89.409004][ T5355] ? __pfx_hfsplus_file_truncate+0x10/0x10 [ 89.409016][ T5355] ? unmap_mapping_range+0xde/0x170 [ 89.409028][ T5355] ? __pfx_unmap_mapping_range+0x10/0x10 [ 89.409039][ T5355] ? truncate_setsize+0xcf/0xf0 [ 89.409051][ T5355] hfsplus_setattr+0x1c4/0x270 [ 89.409061][ T5355] ? __pfx_hfsplus_setattr+0x10/0x10 [ 89.409071][ T5355] notify_change+0xb33/0xe40 [ 89.409085][ T5355] do_truncate+0x1a4/0x220 [ 89.409098][ T5355] ? __pfx_do_truncate+0x10/0x10 [ 89.409110][ T5355] ? apparmor_file_truncate+0x23e/0x2d0 [ 89.409131][ T5355] path_openat+0x306c/0x3830 [ 89.409141][ T5355] ? arch_stack_walk+0xfc/0x150 [ 89.409160][ T5355] ? __pfx_path_openat+0x10/0x10 [ 89.409170][ T5355] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 89.409187][ T5355] do_filp_open+0x1fa/0x410 [ 89.409197][ T5355] ? __lock_acquire+0xab9/0xd20 [ 89.409214][ T5355] ? __pfx_do_filp_open+0x10/0x10 [ 89.409229][ T5355] ? _raw_spin_unlock+0x28/0x50 [ 89.409237][ T5355] ? alloc_fd+0x64c/0x6c0 [ 89.409251][ T5355] do_sys_openat2+0x121/0x1c0 [ 89.409265][ T5355] ? __pfx_do_sys_openat2+0x10/0x10 [ 89.409282][ T5355] ? rcu_is_watching+0x15/0xb0 [ 89.409293][ T5355] __x64_sys_creat+0x8f/0xc0 [ 89.409301][ T5355] do_syscall_64+0xfa/0x3b0 [ 89.409312][ T5355] ? lockdep_hardirqs_on+0x9c/0x150 [ 89.409322][ T5355] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 89.409331][ T5355] ? clear_bhb_loop+0x60/0xb0 [ 89.409343][ T5355] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 89.409356][ T5355] RIP: 0033:0x7f36ca38eb69 [ 89.409368][ T5355] 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 [ 89.409377][ T5355] RSP: 002b:00007f36cb153038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 89.409389][ T5355] RAX: ffffffffffffffda RBX: 00007f36ca5b5fa0 RCX: 00007f36ca38eb69 [ 89.409397][ T5355] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000200000000100 [ 89.409402][ T5355] RBP: 00007f36ca411df1 R08: 0000000000000000 R09: 0000000000000000 [ 89.409408][ T5355] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 89.409413][ T5355] R13: 0000000000000000 R14: 00007f36ca5b5fa0 R15: 00007ffe3e4240e8 [ 89.409423][ T5355] [ 89.879932][ T5333] Bluetooth: hci0: command tx timeout [ 89.960571][ T5353] dvb-usb: found a 'TerraTec/qanu USB2.0 Highspeed DVB-T Receiver' in warm state. [ 89.996999][ T5353] dvb-usb: bulk message failed: -22 (2/0) [ 90.016819][ T5353] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. [ 90.046459][ T5353] dvbdev: DVB: registering new adapter (TerraTec/qanu USB2.0 Highspeed DVB-T Receiver) [ 90.051054][ T5353] usb 5-1: media controller created [ 90.100855][ T5353] dvbdev: dvb_create_media_entity: media entity 'dvb-demux' registered. [ 90.138524][ T5353] dvb-usb: bulk message failed: -22 (1/0) [ 90.142277][ T5353] dvb-usb: no frontend was attached by 'TerraTec/qanu USB2.0 Highspeed DVB-T Receiver' [ 90.148799][ T5353] input: IR-receiver inside an USB DVB receiver as /devices/platform/dummy_hcd.0/usb5/5-1/input/input5 [ 90.192944][ T5353] dvb-usb: schedule remote query interval to 50 msecs. [ 90.198304][ T5353] dvb-usb: bulk message failed: -22 (2/0) [ 90.234069][ T5353] dvb-usb: TerraTec/qanu USB2.0 Highspeed DVB-T Receiver successfully initialized and connected. [ 90.249912][ T5332] dvb-usb: bulk message failed: -22 (1/0) [ 90.266571][ T5353] usb 5-1: USB disconnect, device number 2 [ 90.302847][ T5332] dvb-usb: error while querying for an remote control event. [ 90.336505][ T5353] dvb-usb: TerraTec/qanu USB2.0 Highspeed DVB-T Re successfully deinitialized and disconnected.