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(&(0x7f0000000100)='./file1\x00', 0x310) io_setup(0x202, &(0x7f0000000200)=0x0) r2 = syz_genetlink_get_family_id$nl80211(&(0x7f0000000140), r0) r3 = socket$nl_generic(0x10, 0x3, 0x10) r4 = syz_genetlink_get_family_id$nl80211(&(0x7f0000000040), 0xffffffffffffffff) syz_mount_image$minix(&(0x7f0000000180), &(0x7f00000001c0)='./file0\x00', 0xc00, &(0x7f0000000200), 0x1, 0x184, &(0x7f0000001740)="$eJzs201O6lAYxvGnwL2Xy71+f8aRiYnRgVSBhDCTBbgBZwQqQYsacQIxMS7FnbgTNwADN2ANpYkCDkobKLH/XwLnDclzzungbU8HCEBsnbrfhgyl3cpxnMddSednki4j3hyAqXK88d0BED9JWh+IqV456T7/Xwzp9e2h2vU+aZ/nh1454Y79Wbpf8n/95p8Md9xJDeczkv75Ob88D/L7I+v/n3D9zEh+wXd+cP0He8P5RUlLkpYlrUhalbQmaV3Sxjfr10bW3/a5PgAAAAAAfvTfPrNh8yEm6L89XzRs6zhg/peXPwmY/+3lcyHz+YD5P14+W72xawHnAIJKTNT/h2O/hO3/ZMj+T4XsfyDOWu3OVcW2rTuKmRXy7pvzsh8KivEi6jsTgGkz75u3ZqvdOWo0K3Wrbl0XiqVSsZDPlUz3WG6GOZwDmGufD/2odwIAAAAAAAAAAAAAAILalLQV9SYAAAAAzMQs/k4U9TUCAAAAAAAAAAAAAPDTfQQAAP//nqxIQQ==") ioctl$sock_SIOCGIFINDEX_80211(r3, 0x8933, &(0x7f0000000740)={'wlan1\x00', 0x0}) sendmsg$NL80211_CMD_REGISTER_FRAME(r3, &(0x7f00000005c0)={0x0, 0x0, &(0x7f0000000580)={&(0x7f0000000080)=ANY=[@ANYBLOB='$\x00\x00\x00', @ANYRES16=r4, @ANYBLOB="010000000000000000003a00000008000300", @ANYRES32=r5, @ANYBLOB="05005b"], 0x24}}, 0x0) sendmsg$NL80211_CMD_NEW_KEY(r0, &(0x7f00000001c0)={&(0x7f0000000000)={0x10, 0x0, 0x0, 0x80}, 0xc, &(0x7f0000000180)={&(0x7f0000000240)={0xe4, r2, 0x200, 0x70bd25, 0x25dfdbff, {{}, {@val={0x8, 0x3, r5}, @val={0xc, 0x99, {0x10000, 0xb}}}}, [@NL80211_ATTR_KEY_DEFAULT_TYPES={0x14, 0x6e, 0x0, 0x1, [@NL80211_KEY_DEFAULT_TYPE_UNICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_MULTICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_MULTICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_UNICAST={0x4}]}, @NL80211_ATTR_KEY_DEFAULT_TYPES={0x14, 0x6e, 0x0, 0x1, [@NL80211_KEY_DEFAULT_TYPE_UNICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_MULTICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_UNICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_UNICAST={0x4}]}, @NL80211_ATTR_KEY_DEFAULT_MGMT, @NL80211_ATTR_KEY={0x34, 0x50, 0x0, 0x1, [@NL80211_KEY_DEFAULT_MGMT={0x4}, @NL80211_KEY_MODE={0x5, 0x9, 0x2}, @NL80211_KEY_MODE={0x5, 0x9, 0x2}, @NL80211_KEY_TYPE={0x8, 0x7, 0x1}, @NL80211_KEY_DATA_WEP104={0x11, 0x1, "6a86cef1881ec87087434d8b07"}]}, @NL80211_ATTR_KEY_DATA_WEP40={0x9, 0x7, "1d0db96731"}, @NL80211_ATTR_KEY={0xfffffffffffffe21, 0x50, 0x0, 0x1, [@NL80211_KEY_DEFAULT_TYPES={0x10, 0x8, 0x0, 0x1, [@NL80211_KEY_DEFAULT_TYPE_UNICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_UNICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_MULTICAST={0x4}]}, @NL80211_KEY_CIPHER={0x8, 0x3, 0xfac01}, @NL80211_KEY_DEFAULT_TYPES={0x1c, 0x8, 0x0, 0x1, [@NL80211_KEY_DEFAULT_TYPE_UNICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_UNICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_UNICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_MULTICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_MULTICAST={0x4}, @NL80211_KEY_DEFAULT_TYPE_MULTICAST={0x4}]}, @NL80211_KEY_DEFAULT_MGMT={0x4}, @NL80211_KEY_MODE={0x5, 0x9, 0x1}, @NL80211_KEY_TYPE={0x3}]}]}, 0xe4}}, 0x90) io_submit(r1, 0x3b, &(0x7f0000000540)=[&(0x7f00000000c0)={0x25, 0xe7030000, 0x0, 0x1, 0x0, r0, &(0x7f0000000000), 0x70000}]) [ 85.751118][ T4668] Bluetooth: hci0: command tx timeout [ 85.883159][ T5323] loop0: detected capacity change from 0 to 1024 [ 85.943452][ T5323] [ 85.944647][ T5323] ============================================ [ 85.947433][ T5323] WARNING: possible recursive locking detected [ 85.950192][ T5323] 6.16.0-rc4-syzkaller-00049-gb4911fb0b060 #0 Not tainted [ 85.953528][ T5323] -------------------------------------------- [ 85.956473][ T5323] syz.0.0/5323 is trying to acquire lock: [ 85.959070][ T5323] ffff888053208108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1fc/0x1990 [ 85.964061][ T5323] [ 85.964061][ T5323] but task is already holding lock: [ 85.967101][ T5323] ffff88805320a988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1fc/0x1990 [ 85.971808][ T5323] [ 85.971808][ T5323] other info that might help us debug this: [ 85.975504][ T5323] Possible unsafe locking scenario: [ 85.975504][ T5323] [ 85.978926][ T5323] CPU0 [ 85.980529][ T5323] ---- [ 85.982157][ T5323] lock(&HFSPLUS_I(inode)->extents_lock); [ 85.984913][ T5323] lock(&HFSPLUS_I(inode)->extents_lock); [ 85.987600][ T5323] [ 85.987600][ T5323] *** DEADLOCK *** [ 85.987600][ T5323] [ 85.991559][ T5323] May be due to missing lock nesting notation [ 85.991559][ T5323] [ 85.995408][ T5323] 3 locks held by syz.0.0/5323: [ 85.997638][ T5323] #0: ffff88805320ab78 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: generic_file_write_iter+0xe3/0x540 [ 86.002357][ T5323] #1: ffff88805320a988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1fc/0x1990 [ 86.007400][ T5323] #2: ffff8880323100b0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfsplus_find_init+0x15a/0x1d0 [ 86.011826][ T5323] [ 86.011826][ T5323] stack backtrace: [ 86.014881][ T5323] CPU: 0 UID: 0 PID: 5323 Comm: syz.0.0 Not tainted 6.16.0-rc4-syzkaller-00049-gb4911fb0b060 #0 PREEMPT(full) [ 86.014902][ T5323] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.014910][ T5323] Call Trace: [ 86.014918][ T5323] [ 86.014924][ T5323] dump_stack_lvl+0x189/0x250 [ 86.014947][ T5323] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.014963][ T5323] ? __pfx__printk+0x10/0x10 [ 86.014974][ T5323] ? print_lock_name+0xde/0x100 [ 86.014985][ T5323] print_deadlock_bug+0x28b/0x2a0 [ 86.014996][ T5323] validate_chain+0x1a3f/0x2140 [ 86.015007][ T5323] ? check_path+0x21/0x40 [ 86.015016][ T5323] ? check_noncircular+0xe0/0x160 [ 86.015025][ T5323] ? look_up_lock_class+0x74/0x170 [ 86.015085][ T5323] ? register_lock_class+0x51/0x320 [ 86.015101][ T5323] __lock_acquire+0xab9/0xd20 [ 86.015118][ T5323] ? hfsplus_file_extend+0x1fc/0x1990 [ 86.015130][ T5323] lock_acquire+0x120/0x360 [ 86.015142][ T5323] ? hfsplus_file_extend+0x1fc/0x1990 [ 86.015157][ T5323] __mutex_lock+0x182/0xe80 [ 86.015171][ T5323] ? hfsplus_file_extend+0x1fc/0x1990 [ 86.015184][ T5323] ? check_path+0x21/0x40 [ 86.015192][ T5323] ? check_noncircular+0xe0/0x160 [ 86.015202][ T5323] ? hfsplus_file_extend+0x1fc/0x1990 [ 86.015214][ T5323] ? __pfx___mutex_lock+0x10/0x10 [ 86.015231][ T5323] hfsplus_file_extend+0x1fc/0x1990 [ 86.015245][ T5323] ? __pfx_hfsplus_file_extend+0x10/0x10 [ 86.015256][ T5323] ? __mutex_trylock_common+0x153/0x260 [ 86.015266][ T5323] ? __pfx___mutex_trylock_common+0x10/0x10 [ 86.015277][ T5323] ? rcu_is_watching+0x15/0xb0 [ 86.015292][ T5323] ? trace_contention_end+0x39/0x120 [ 86.015308][ T5323] ? __mutex_lock+0x330/0xe80 [ 86.015323][ T5323] ? hfsplus_brec_find+0x191/0x500 [ 86.015335][ T5323] hfsplus_bmap_reserve+0x122/0x500 [ 86.015353][ T5323] __hfsplus_ext_write_extent+0x28d/0x5b0 [ 86.015365][ T5323] __hfsplus_ext_cache_extent+0x89/0xe30 [ 86.015380][ T5323] hfsplus_file_extend+0x444/0x1990 [ 86.015394][ T5323] ? __pfx_hfsplus_file_extend+0x10/0x10 [ 86.015405][ T5323] ? clean_bdev_aliases+0x5c9/0x6b0 [ 86.015420][ T5323] ? __pfx_clean_bdev_aliases+0x10/0x10 [ 86.015433][ T5323] hfsplus_get_block+0x411/0x1530 [ 86.015446][ T5323] ? __pfx_hfsplus_get_block+0x10/0x10 [ 86.015457][ T5323] ? do_raw_spin_unlock+0x4d/0x240 [ 86.015469][ T5323] ? _raw_spin_unlock+0x28/0x50 [ 86.015482][ T5323] __block_write_begin_int+0x6b2/0x1900 [ 86.015497][ T5323] ? folio_add_lru+0x1b2/0x3d0 [ 86.015509][ T5323] ? __pfx_hfsplus_get_block+0x10/0x10 [ 86.015520][ T5323] ? __pfx___block_write_begin_int+0x10/0x10 [ 86.015535][ T5323] cont_write_begin+0x789/0xb50 [ 86.015548][ T5323] ? __pfx_cont_write_begin+0x10/0x10 [ 86.015559][ T5323] ? __pfx___might_resched+0x10/0x10 [ 86.015573][ T5323] ? folio_unlock+0x101/0x160 [ 86.015584][ T5323] hfsplus_write_begin+0x66/0xb0 [ 86.015596][ T5323] ? __pfx_hfsplus_get_block+0x10/0x10 [ 86.015607][ T5323] generic_perform_write+0x2c7/0x910 [ 86.015623][ T5323] ? __pfx_generic_perform_write+0x10/0x10 [ 86.015635][ T5323] ? file_update_time+0x2da/0x490 [ 86.015649][ T5323] ? __generic_file_write_iter+0xf9/0x230 [ 86.015659][ T5323] ? generic_file_write_iter+0xfb/0x540 [ 86.015671][ T5323] generic_file_write_iter+0x10f/0x540 [ 86.015683][ T5323] ? aa_file_perm+0x11f/0xed0 [ 86.015696][ T5323] ? __pfx_generic_file_write_iter+0x10/0x10 [ 86.015713][ T5323] ? __lock_acquire+0xab9/0xd20 [ 86.015730][ T5323] ? aio_write+0x4c4/0x7a0 [ 86.015741][ T5323] aio_write+0x535/0x7a0 [ 86.015752][ T5323] ? __pfx_aio_write+0x10/0x10 [ 86.015765][ T5323] ? __might_fault+0xb0/0x130 [ 86.015779][ T5323] io_submit_one+0x78b/0x1310 [ 86.015793][ T5323] ? __pfx_io_submit_one+0x10/0x10 [ 86.015803][ T5323] ? __might_fault+0xb0/0x130 [ 86.015813][ T5323] ? __might_fault+0xb0/0x130 [ 86.015822][ T5323] __se_sys_io_submit+0x185/0x2f0 [ 86.015862][ T5323] ? __pfx___se_sys_io_submit+0x10/0x10 [ 86.015877][ T5323] ? do_syscall_64+0xbe/0x3b0 [ 86.015894][ T5323] do_syscall_64+0xfa/0x3b0 [ 86.015911][ T5323] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.015924][ T5323] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.015934][ T5323] ? clear_bhb_loop+0x60/0xb0 [ 86.015945][ T5323] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.015955][ T5323] RIP: 0033:0x7fe36578e929 [ 86.015965][ T5323] 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 [ 86.015974][ T5323] RSP: 002b:00007fe36656a038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1 [ 86.015987][ T5323] RAX: ffffffffffffffda RBX: 00007fe3659b5fa0 RCX: 00007fe36578e929 [ 86.015995][ T5323] RDX: 0000200000000540 RSI: 000000000000003b RDI: 00007fe366520000 [ 86.016002][ T5323] RBP: 00007fe365810b39 R08: 0000000000000000 R09: 0000000000000000 [ 86.016008][ T5323] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.016014][ T5323] R13: 0000000000000000 R14: 00007fe3659b5fa0 R15: 00007fff4c02a1b8 [ 86.016026][ T5323]