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 = creat(&(0x7f0000000000)='./file1\x00', 0x0) r1 = openat$tun(0xffffffffffffff9c, &(0x7f0000000140), 0x30281, 0x0) ioctl$TUNSETIFF(r1, 0x400454ca, &(0x7f0000000040)={'syzkaller1\x00', 0x2}) ioctl$TUNSETOFFLOAD(r1, 0x400454c9, 0xba98575a95aeb70d) r2 = socket$igmp6(0xa, 0x3, 0x2) ioctl$sock_SIOCSIFVLAN_ADD_VLAN_CMD(r2, 0x8983, &(0x7f0000000300)={0x0, 'syzkaller1\x00', {0x2}}) ioctl$TUNSETLINK(r1, 0x400454cd, 0x30c) io_setup(0x202, &(0x7f0000000200)=0x0) io_submit(r3, 0x3b, &(0x7f0000000540)=[&(0x7f00000000c0)={0x25, 0xe7030000, 0x0, 0x1, 0x0, r0, &(0x7f0000000000), 0x70000}]) syz_init_net_socket$nl_generic(0x10, 0x3, 0x10) [ 87.227583][ T4702] Bluetooth: hci0: command tx timeout [ 87.239709][ T55] cfg80211: failed to load regulatory.db [ 87.325524][ T5362] loop0: detected capacity change from 0 to 1024 [ 87.420855][ T5362] [ 87.421974][ T5362] ============================================ [ 87.424591][ T5362] WARNING: possible recursive locking detected [ 87.427251][ T5362] syzkaller #0 Not tainted [ 87.429170][ T5362] -------------------------------------------- [ 87.431728][ T5362] syz.0.0/5362 is trying to acquire lock: [ 87.434406][ T5362] ffff888052d10108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1fc/0x1990 [ 87.439150][ T5362] [ 87.439150][ T5362] but task is already holding lock: [ 87.442340][ T5362] ffff888052d12988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1fc/0x1990 [ 87.447138][ T5362] [ 87.447138][ T5362] other info that might help us debug this: [ 87.450672][ T5362] Possible unsafe locking scenario: [ 87.450672][ T5362] [ 87.453931][ T5362] CPU0 [ 87.455395][ T5362] ---- [ 87.456683][ T5362] lock(&HFSPLUS_I(inode)->extents_lock); [ 87.459139][ T5362] lock(&HFSPLUS_I(inode)->extents_lock); [ 87.461444][ T5362] [ 87.461444][ T5362] *** DEADLOCK *** [ 87.461444][ T5362] [ 87.464846][ T5362] May be due to missing lock nesting notation [ 87.464846][ T5362] [ 87.468432][ T5362] 3 locks held by syz.0.0/5362: [ 87.470368][ T5362] #0: ffff888052d12b78 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: generic_file_write_iter+0xeb/0x550 [ 87.474873][ T5362] #1: ffff888052d12988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1fc/0x1990 [ 87.479741][ T5362] #2: ffff8880370d20b0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfsplus_find_init+0x15a/0x1d0 [ 87.484224][ T5362] [ 87.484224][ T5362] stack backtrace: [ 87.486736][ T5362] CPU: 0 UID: 0 PID: 5362 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 87.486755][ T5362] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 87.486763][ T5362] Call Trace: [ 87.486772][ T5362] [ 87.486778][ T5362] dump_stack_lvl+0x189/0x250 [ 87.486795][ T5362] ? __pfx_dump_stack_lvl+0x10/0x10 [ 87.486804][ T5362] ? __pfx__printk+0x10/0x10 [ 87.486821][ T5362] ? print_lock_name+0xde/0x100 [ 87.486832][ T5362] print_deadlock_bug+0x28b/0x2a0 [ 87.486845][ T5362] validate_chain+0x1a3f/0x2140 [ 87.486857][ T5362] ? __bfs+0x151/0x2a0 [ 87.486868][ T5362] ? check_path+0x21/0x40 [ 87.486878][ T5362] ? look_up_lock_class+0x74/0x170 [ 87.486936][ T5362] ? register_lock_class+0x51/0x320 [ 87.486953][ T5362] __lock_acquire+0xab9/0xd20 [ 87.486970][ T5362] ? hfsplus_file_extend+0x1fc/0x1990 [ 87.486982][ T5362] lock_acquire+0x120/0x360 [ 87.486997][ T5362] ? hfsplus_file_extend+0x1fc/0x1990 [ 87.487011][ T5362] __mutex_lock+0x187/0x1350 [ 87.487026][ T5362] ? hfsplus_file_extend+0x1fc/0x1990 [ 87.487033][ T5362] ? check_path+0x21/0x40 [ 87.487039][ T5362] ? check_noncircular+0xe0/0x160 [ 87.487047][ T5362] ? hfsplus_file_extend+0x1fc/0x1990 [ 87.487053][ T5362] ? lockdep_unlock+0x89/0x120 [ 87.487062][ T5362] ? __pfx___mutex_lock+0x10/0x10 [ 87.487074][ T5362] hfsplus_file_extend+0x1fc/0x1990 [ 87.487081][ T5362] ? __lock_acquire+0xab9/0xd20 [ 87.487092][ T5362] ? __pfx_hfsplus_file_extend+0x10/0x10 [ 87.487098][ T5362] ? __pfx___mutex_trylock_common+0x10/0x10 [ 87.487105][ T5362] ? __se_sys_io_submit+0x185/0x2f0 [ 87.487117][ T5362] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.487127][ T5362] ? rcu_is_watching+0x15/0xb0 [ 87.487138][ T5362] ? trace_contention_end+0x39/0x120 [ 87.487151][ T5362] ? __mutex_lock+0x335/0x1350 [ 87.487167][ T5362] ? hfsplus_brec_find+0x191/0x500 [ 87.487185][ T5362] hfsplus_bmap_reserve+0x122/0x500 [ 87.487201][ T5362] __hfsplus_ext_write_extent+0x28d/0x5b0 [ 87.487211][ T5362] __hfsplus_ext_cache_extent+0x89/0xe30 [ 87.487221][ T5362] hfsplus_file_extend+0x444/0x1990 [ 87.487234][ T5362] ? __pfx_hfsplus_file_extend+0x10/0x10 [ 87.487246][ T5362] ? clean_bdev_aliases+0x5c9/0x6b0 [ 87.487265][ T5362] ? __pfx_clean_bdev_aliases+0x10/0x10 [ 87.487283][ T5362] hfsplus_get_block+0x411/0x1530 [ 87.487297][ T5362] ? __pfx_hfsplus_get_block+0x10/0x10 [ 87.487307][ T5362] ? do_raw_spin_unlock+0x4d/0x240 [ 87.487316][ T5362] ? _raw_spin_unlock+0x28/0x50 [ 87.487329][ T5362] __block_write_begin_int+0x6b2/0x1900 [ 87.487340][ T5362] ? folio_add_lru+0x1b2/0x3d0 [ 87.487356][ T5362] ? __pfx_hfsplus_get_block+0x10/0x10 [ 87.487368][ T5362] ? __pfx___block_write_begin_int+0x10/0x10 [ 87.487380][ T5362] cont_write_begin+0x789/0xb50 [ 87.487394][ T5362] ? __pfx_cont_write_begin+0x10/0x10 [ 87.487405][ T5362] ? __pfx___might_resched+0x10/0x10 [ 87.487416][ T5362] ? __mark_inode_dirty+0x3d2/0xe10 [ 87.487431][ T5362] ? folio_unlock+0x101/0x160 [ 87.487446][ T5362] hfsplus_write_begin+0x66/0xb0 [ 87.487456][ T5362] ? __pfx_hfsplus_get_block+0x10/0x10 [ 87.487464][ T5362] generic_perform_write+0x2c5/0x900 [ 87.487473][ T5362] ? __pfx_generic_perform_write+0x10/0x10 [ 87.487479][ T5362] ? file_update_time+0x2da/0x490 [ 87.487491][ T5362] ? __generic_file_write_iter+0xf9/0x230 [ 87.487497][ T5362] ? generic_file_write_iter+0x103/0x550 [ 87.487508][ T5362] generic_file_write_iter+0x117/0x550 [ 87.487518][ T5362] ? __pfx_generic_file_write_iter+0x10/0x10 [ 87.487529][ T5362] ? do_raw_spin_unlock+0x4d/0x240 [ 87.487541][ T5362] ? __pfx_aa_file_perm+0x10/0x10 [ 87.487556][ T5362] ? __free_frozen_pages+0x691/0xd30 [ 87.487574][ T5362] ? __lock_acquire+0xab9/0xd20 [ 87.487594][ T5362] ? aio_write+0x4c4/0x7a0 [ 87.487611][ T5362] aio_write+0x535/0x7a0 [ 87.487624][ T5362] ? __pfx_aio_write+0x10/0x10 [ 87.487636][ T5362] ? __might_fault+0xb0/0x130 [ 87.487648][ T5362] io_submit_one+0x78b/0x1310 [ 87.487661][ T5362] ? __pfx_io_submit_one+0x10/0x10 [ 87.487672][ T5362] ? __might_fault+0xb0/0x130 [ 87.487682][ T5362] ? __might_fault+0xb0/0x130 [ 87.487690][ T5362] __se_sys_io_submit+0x185/0x2f0 [ 87.487700][ T5362] ? __pfx___se_sys_io_submit+0x10/0x10 [ 87.487710][ T5362] ? do_syscall_64+0xbe/0x3b0 [ 87.487722][ T5362] do_syscall_64+0xfa/0x3b0 [ 87.487736][ T5362] ? lockdep_hardirqs_on+0x9c/0x150 [ 87.487752][ T5362] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.487794][ T5362] ? clear_bhb_loop+0x60/0xb0 [ 87.487813][ T5362] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 87.487824][ T5362] RIP: 0033:0x7f2e6bb8ebe9 [ 87.487836][ T5362] 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.487846][ T5362] RSP: 002b:00007f2e6ca23038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1 [ 87.487860][ T5362] RAX: ffffffffffffffda RBX: 00007f2e6bdb5fa0 RCX: 00007f2e6bb8ebe9 [ 87.487869][ T5362] RDX: 0000200000000540 RSI: 000000000000003b RDI: 00007f2e6c9d9000 [ 87.487877][ T5362] RBP: 00007f2e6bc11e19 R08: 0000000000000000 R09: 0000000000000000 [ 87.487885][ T5362] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 87.487892][ T5362] R13: 00007f2e6bdb6038 R14: 00007f2e6bdb5fa0 R15: 00007ffc2917a548 [ 87.487904][ T5362]