program: syz_mount_image$hfs(&(0x7f0000000340), &(0x7f0000000380)='./file0\x00', 0x0, &(0x7f00000003c0)=ANY=[@ANYBLOB="71756965742c636f6465706167653d63703836302c696f636861727365743d63703836312c00808fead042bd35dc78f7f06333a5e7165b8271e41aee85e59cbb6c2df3d4e4c16b06c73f2e3b348a7fba46e286378a15ee516bac8d4813c9c3d9cee1ddb95d1bbcf504e065b3749a1cbd841e685a558598cf0db10b55885946e678d0a71877037a090000000700848879ef1604cadc1faca3aa22a576750d559c4e124d4cb7293e7393b77286a03d342382e84d6d3c29ab95cc923fbe25e134d1c421320a3bffaa17fcd6b5178e322cc47133b3811e3d3bc34998dc7ed029834ad591d9d55141063d8de2d50a4fa0e73ff2913a9fe8e954a4e4ca99ce24dba4e0812c2ccf8ab5737e57193c5f47fd63b16c8b34f256dbac0e5ebd009078df2cb1ca1051ad091adbfee5126d8a59fa5438734bc3e8cc7b7edc10716a0ace21dc04bd9c3248b598267822670a02be81f017e946a7e3359ce433ae42aae07518c3850cff4cf415bdb29ab165216a12899868d6857b732eafbab59fba36fca0b5cab2e717cd6ffef31a24add5f56b30c27b9e616892b60f4cde07eb9cb090ca25e5b8c6858a27e7e4d5cac6ed29218fcd35804fe2a5cb1ca503991051eb9c04a88bf02e8e240ee4c8b0ae80396aff9f8a913e8dc6b15e15b0a7c82953a87ef02b1e7abea95a7ae79eca2a536a59abfa3cccc1a6664d20344fedc524f3867f1dd8ba04bcd90aa43e024891f779210ec076e0b13ebf2bef2ac1a30f7a396a508b00000000000000", @ANYRESOCT=0x0, @ANYRESOCT, @ANYRESDEC=0x0, @ANYRES16=0x0, @ANYRES8], 0x1, 0x32a, &(0x7f0000000640)="$eJzs3U1rE08cB/DvTJJm+2/+dfsggsdqQS+i9SJeIpK3IIgH0bYRiqGiVlAvJuJJRO/efQu+CC+Kb0BPHsSr0F4cmdnZTXZ39iFt2jX6/YC42d3J/CYzk/1NUAZE9M+62vny7uI3/UcANdSAl5cBCcAD6gCO44T3aHtna6fX3cx7o5opgT0FgaCkSN2zsd01fw/ip3U5U8Ly9as6WqPn6HAopa58TZz7LisKhipjZr+DBJp2dprr3pFHlm9Q5ibHeO4fQizTROxiF48xX3UcRERULf38HwRPSv2cb9n8XUpgFRh4f+rzv5z/U2d+VhLHUVK5V0ee/2aVpYTu32Pm0nC9Z5Zw+roMV4llam4kXs8gyMFiCaZwryqHSz4Ti5y9s9Xrntu419uUeI62NVJgOarB0iO0INoVx9o0R4m2C2dGGYQlG7oNaxnxL+2zxhypdDfWIeKD+CRuCh9vsRnlf3UldLQmYD/RU0H857PrmzOl9F2wXxvtdluaNwotmEpOxnsqu5VmFHjuFQnCD3YB8R8I/KI4TanFRKmgdRecBZpRqSVnqbXwVUZdy7FSujXRaM6OcjLUs6wr4rW4LlbwA+/RGcn/pY5vFemZOdIJw1kjVoOJZj7xoD0z7urq5j391JOjjxut+JnoU2xmhb6nBH8SOqCwD19hHZcw//DJ07u1Xq/7QB/cdhzcb0VnGi8A5z0VH6A/PNOEMlI3h9+BseKz9uQYldbGCOzsRFuqJ2LhzXqWJS+FrZzoJz86EsIJO7E+hax+aOWNjc7HxEAqPFC1cnNHNZ0j3C/u94xLv9Q+2p7Ol+nvNOz0qiOhiui8SwTrP5PJ23zf5Gs6W7jWzF6NhItMV8pmEkf7jkrn2NEKyIuVXzRH/8XT6IIV0JzNYxzruD5Say797E+tuU6dAU6Xr9G3cU6H7PTfEh18xi3+/k9ERERERERERERERERERERERERENG3G/98Rs2OWavBflhMRERERERERERERERERERERERERERERHVC0/y/C/X9Rbv/f5PZSdv9fDwX7/66nY0jt//tmG6IPcP9fosP1OwAA//+1UnIe") prlimit64(0x0, 0xe, &(0x7f0000000980)={0x8, 0x20000008b}, 0x0) sched_setscheduler(0x0, 0x1, &(0x7f00000009c0)=0x7) r0 = openat(0xffffffffffffff9c, &(0x7f0000006140)='./bus\x00', 0x141842, 0x0) r1 = openat$cgroup_ro(0xffffffffffffff9c, &(0x7f0000006180)='cpuacct.usage_percpu\x00', 0x275a, 0x0) r2 = openat$cgroup_ro(0xffffffffffffff9c, &(0x7f00000061c0)='cpuacct.usage_percpu\x00', 0x275a, 0x0) write$binfmt_script(r2, &(0x7f0000006200), 0xfea7) copy_file_range(r1, 0x0, r0, 0x0, 0xffffffffa003e459, 0x700000000000000) r3 = openat(0xffffffffffffff9c, &(0x7f0000000a00)='./file1\x00', 0x42, 0x0) write$FUSE_WRITE(r3, &(0x7f0000000a40)={0x18}, 0xfffffdef) [ 77.551157][ T4649] Bluetooth: hci0: command tx timeout [ 77.559553][ T1335] ieee802154 phy0 wpan0: encryption failed: -22 [ 77.560031][ T1335] ieee802154 phy1 wpan1: encryption failed: -22 [ 77.692828][ T5316] loop0: detected capacity change from 0 to 64 [ 77.768920][ T5316] syz.0.0: attempt to access beyond end of device [ 77.768920][ T5316] loop0: rw=8390657, sector=163, nr_sectors = 1 limit=64 [ 77.768985][ T5316] Buffer I/O error on dev loop0, logical block 163, lost async page write [ 77.769011][ T5316] syz.0.0: attempt to access beyond end of device [ 77.769011][ T5316] loop0: rw=8390657, sector=167, nr_sectors = 1 limit=64 [ 77.769955][ T5316] Buffer I/O error on dev loop0, logical block 167, lost async page write [ 77.769976][ T5316] syz.0.0: attempt to access beyond end of device [ 77.769976][ T5316] loop0: rw=8390657, sector=169, nr_sectors = 1 limit=64 [ 77.769989][ T5316] Buffer I/O error on dev loop0, logical block 169, lost async page write [ 77.770002][ T5316] syz.0.0: attempt to access beyond end of device [ 77.770002][ T5316] loop0: rw=8390657, sector=171, nr_sectors = 1 limit=64 [ 77.770013][ T5316] Buffer I/O error on dev loop0, logical block 171, lost async page write [ 77.770024][ T5316] syz.0.0: attempt to access beyond end of device [ 77.770024][ T5316] loop0: rw=8390657, sector=172, nr_sectors = 1 limit=64 [ 77.770036][ T5316] Buffer I/O error on dev loop0, logical block 172, lost async page write [ 77.770047][ T5316] syz.0.0: attempt to access beyond end of device [ 77.770047][ T5316] loop0: rw=8390657, sector=173, nr_sectors = 1 limit=64 [ 77.770058][ T5316] Buffer I/O error on dev loop0, logical block 173, lost async page write [ 77.770069][ T5316] syz.0.0: attempt to access beyond end of device [ 77.770069][ T5316] loop0: rw=8390657, sector=174, nr_sectors = 1 limit=64 [ 77.770079][ T5316] Buffer I/O error on dev loop0, logical block 174, lost async page write [ 77.770090][ T5316] syz.0.0: attempt to access beyond end of device [ 77.770090][ T5316] loop0: rw=8390657, sector=175, nr_sectors = 1 limit=64 [ 77.770100][ T5316] Buffer I/O error on dev loop0, logical block 175, lost async page write [ 77.770491][ T5316] syz.0.0: attempt to access beyond end of device [ 77.770491][ T5316] loop0: rw=8390657, sector=176, nr_sectors = 1 limit=64 [ 77.770507][ T5316] Buffer I/O error on dev loop0, logical block 176, lost async page write [ 77.770520][ T5316] syz.0.0: attempt to access beyond end of device [ 77.770520][ T5316] loop0: rw=8390657, sector=177, nr_sectors = 1 limit=64 [ 77.770531][ T5316] Buffer I/O error on dev loop0, logical block 177, lost async page write qemu-system-x86_64: ahci: PRDT length for NCQ command (0x0) is smaller than the requested size (0xe7000) [ 78.891445][ T1066] [ 78.892634][ T1066] ============================================ [ 78.895537][ T1066] WARNING: possible recursive locking detected [ 78.898080][ T1066] syzkaller #0 Not tainted [ 78.899934][ T1066] -------------------------------------------- [ 78.902600][ T1066] kworker/u4:14/1066 is trying to acquire lock: [ 78.905249][ T1066] ffff888034efe0a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 78.909208][ T1066] [ 78.909208][ T1066] but task is already holding lock: [ 78.912358][ T1066] ffff888034efe0a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 78.916250][ T1066] [ 78.916250][ T1066] other info that might help us debug this: [ 78.919554][ T1066] Possible unsafe locking scenario: [ 78.919554][ T1066] [ 78.922611][ T1066] CPU0 [ 78.924003][ T1066] ---- [ 78.925399][ T1066] lock(&tree->tree_lock/1); [ 78.927539][ T1066] lock(&tree->tree_lock/1); [ 78.929684][ T1066] [ 78.929684][ T1066] *** DEADLOCK *** [ 78.929684][ T1066] [ 78.933238][ T1066] May be due to missing lock nesting notation [ 78.933238][ T1066] [ 78.936943][ T1066] locks held by kworker/u4:14/1066: 5, last CPU#0: [ 78.939778][ T1066] #0: ffff88801d375140 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 [ 78.944443][ T1066] #1: ffffc90004fa7c40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 [ 78.949567][ T1066] #2: ffff8880130080e8 (&type->s_umount_key#54){.+.+}-{4:4}, at: super_trylock_shared+0x23/0xf0 [ 78.953998][ T1066] #3: ffff888034efe0a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 78.958177][ T1066] #4: ffff888013e500a0 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf9/0x1680 [ 78.962783][ T1066] [ 78.962783][ T1066] stack backtrace: [ 78.965364][ T1066] CPU: 0 UID: 0 PID: 1066 Comm: kworker/u4:14 Not tainted syzkaller #0 PREEMPT(full) [ 78.969131][ T1066] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 78.973424][ T1066] Workqueue: writeback wb_workfn (flush-7:0) [ 78.976100][ T1066] Call Trace: [ 78.977654][ T1066] [ 78.978985][ T1066] dump_stack_lvl+0xe8/0x150 [ 78.981115][ T1066] print_deadlock_bug+0x27a/0x290 [ 78.983398][ T1066] __lock_acquire+0x25db/0x2de0 [ 78.985545][ T1066] ? _raw_spin_unlock_irqrestore+0x4c/0x80 [ 78.990164][ T1066] ? stack_depot_save_flags+0x404/0x7f0 [ 78.992572][ T1066] ? kasan_save_track+0x4f/0x80 [ 78.994681][ T1066] ? kasan_save_track+0x3e/0x80 [ 78.996889][ T1066] ? __kasan_kmalloc+0x93/0xb0 [ 78.998941][ T1066] ? __kmalloc_noprof+0x36b/0x720 [ 79.001047][ T1066] ? hfs_find_init+0x9d/0x300 [ 79.003086][ T1066] ? hfs_extend_file+0x367/0x1680 [ 79.005274][ T1066] ? hfs_bmap_reserve+0x108/0x430 [ 79.007315][ T1066] ? __hfs_ext_write_extent+0x1fc/0x470 [ 79.009625][ T1066] lock_acquire+0x115/0x350 [ 79.011564][ T1066] ? hfs_find_init+0x18d/0x300 [ 79.013697][ T1066] __mutex_lock+0x19d/0x1550 [ 79.015650][ T1066] ? hfs_find_init+0x18d/0x300 [ 79.017607][ T1066] ? hfs_find_init+0x18d/0x300 [ 79.019557][ T1066] ? __pfx___mutex_lock+0x10/0x10 [ 79.021627][ T1066] ? rcu_is_watching+0x16/0xb0 [ 79.023753][ T1066] ? trace_kmalloc+0x2a/0xf0 [ 79.025909][ T1066] ? __kmalloc_noprof+0x38c/0x720 [ 79.028281][ T1066] ? __kmalloc_noprof+0x1ab/0x720 [ 79.030482][ T1066] ? hfs_find_init+0x9d/0x300 [ 79.032482][ T1066] hfs_find_init+0x18d/0x300 [ 79.034650][ T1066] hfs_extend_file+0x367/0x1680 [ 79.036976][ T1066] ? __pfx_hfs_extend_file+0x10/0x10 [ 79.039260][ T1066] ? _raw_spin_unlock+0x28/0x50 [ 79.041339][ T1066] ? hfs_brec_find+0x3db/0x510 [ 79.043457][ T1066] hfs_bmap_reserve+0x108/0x430 [ 79.045602][ T1066] __hfs_ext_write_extent+0x1fc/0x470 [ 79.047906][ T1066] hfs_ext_write_extent+0x17d/0x210 [ 79.050231][ T1066] ? __pfx___mpage_writepages+0x10/0x10 [ 79.052617][ T1066] ? __pfx_hfs_ext_write_extent+0x10/0x10 [ 79.055241][ T1066] hfs_write_inode+0x117/0xa00 [ 79.057432][ T1066] ? __pfx_hfs_write_inode+0x10/0x10 [ 79.059457][ T1066] ? do_raw_spin_unlock+0x4d/0x200 [ 79.061572][ T1066] __writeback_single_inode+0x69d/0x1220 [ 79.063972][ T1066] writeback_sb_inodes+0x9de/0x1b00 [ 79.066216][ T1066] ? __pfx_writeback_sb_inodes+0x10/0x10 [ 79.068665][ T1066] ? __pfx_down_read_trylock+0x10/0x10 [ 79.070968][ T1066] ? __pfx___up_read+0x10/0x10 [ 79.073090][ T1066] __writeback_inodes_wb+0x114/0x240 [ 79.075328][ T1066] wb_writeback+0x42f/0xad0 [ 79.077246][ T1066] ? queue_io+0x2b1/0x470 [ 79.079006][ T1066] ? __pfx_wb_writeback+0x10/0x10 [ 79.081087][ T1066] ? do_raw_spin_lock+0x12b/0x2f0 [ 79.083224][ T1066] wb_workfn+0x980/0x10f0 [ 79.085047][ T1066] ? __pfx_wb_workfn+0x10/0x10 [ 79.087083][ T1066] ? do_raw_spin_lock+0x12b/0x2f0 [ 79.089295][ T1066] ? lock_acquire+0x115/0x350 [ 79.091291][ T1066] ? rcu_is_watching+0x16/0xb0 [ 79.093495][ T1066] ? process_scheduled_works+0x97a/0x1630 [ 79.096419][ T1066] process_scheduled_works+0xc3d/0x1630 [ 79.099086][ T1066] ? __pfx_process_scheduled_works+0x10/0x10 [ 79.101665][ T1066] ? assign_work+0x3cf/0x5d0 [ 79.103628][ T1066] worker_thread+0xa47/0xfb0 [ 79.105587][ T1066] kthread+0x38b/0x480 [ 79.107313][ T1066] ? __pfx_worker_thread+0x10/0x10 [ 79.109444][ T1066] ? __pfx_kthread+0x10/0x10 [ 79.111386][ T1066] ret_from_fork+0x514/0xb70 [ 79.113277][ T1066] ? __pfx_ret_from_fork+0x10/0x10 [ 79.115461][ T1066] ? __switch_to+0xc89/0x1420 [ 79.117499][ T1066] ? __pfx_kthread+0x10/0x10 [ 79.119494][ T1066] ret_from_fork_asm+0x1a/0x30 [ 79.121485][ T1066]