program: syz_mount_image$hfs(&(0x7f0000000200), &(0x7f0000000340)='./file0\x00', 0x0, &(0x7f0000000380)=ANY=[@ANYBLOB="71756965742c636f6465706167653d63703836302c696f636861727365743d63703836312c00808fead042bd35dc78f7f06333a5e7165b8271e41aee85e59cbb6c2df3d4e4c16b06c73f2e3b348a7fba46e286378a15ee516bac8d4813c9c3d9cee1ddb95d1bbcf504e065b3749a1cbd841e685a558598cf0db10b55885946e678d0a71877037a090000000700848879ef1604cadc1faca3aa22a576750d559c4e124d4cb7293e7393b77286a03d342382e84d6d3c29ab95cc923fbe25e134d1c421320a3bffaa17fcd6b5178e322cc47133b3811e3d3bc34998dc7ed029834ad591d9d55141063d8de2d50a4fa0e73ff2913a9fe8e954a4e4ca99ce24dba4e0812c2ccf8ab5737e57193c5f47fd63b16c8b34f256dbac0e5ebd009078df2cb1ca1051ad091adbfee5126d8a59fa5438734bc3e8cc7b7edc10716a0ace21dc04bd9c3248b598267822670a02be81f017e946a7e3359ce433ae42aae07518c3850cff4cf415bdb29ab165216a12899868d6857b732eafbab59fba36fca0b5cab2e717cd6ffef31a24add5f56b30c27b9e616892b60f4cde07eb9cb090ca25e5b8c6858a27e7e4d5cac6ed29218fcd35804fe2a5cb1ca503991051eb9c04a88bf02e8e240ee4c8b0ae80396aff9f8a913e8dc6b15e15b0a7c82953a87ef02b1e7abea95a7ae79eca2a536a59abfa3cccc1a6664d20344fedc524f3867f1dd8ba04bcd90aa43e024891f779210ec076e0b13ebf2bef2ac1a30f7a396a508b00000000000000", @ANYRESOCT=0x0, @ANYRESOCT, @ANYRESDEC=0x0, @ANYRES16=0x0, @ANYRES8], 0x1, 0x32a, &(0x7f00000007c0)="$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, &(0x7f0000000b00)={0x8, 0x20000008b}, 0x0) sched_setscheduler(0x0, 0x1, &(0x7f0000000b40)=0x7) r0 = openat(0xffffffffffffff9c, &(0x7f0000000b80)='./file1\x00', 0x42, 0x0) write$FUSE_WRITE(r0, &(0x7f0000000bc0)={0x18}, 0xfffffdef) ioctl$FIBMAP(r0, 0x1, &(0x7f0000000c00)=0x101) r1 = openat$cgroup_ro(0xffffffffffffff9c, &(0x7f00000006c0)='memory.events\x00', 0x275a, 0x0) write$cgroup_subtree(r1, &(0x7f0000000e00)=ANY=[], 0x10448) [ 87.108692][ T48] Bluetooth: hci0: command tx timeout [ 87.128602][ T1376] cfg80211: failed to load regulatory.db [ 87.198126][ T5356] loop0: detected capacity change from 0 to 64 [ 88.232019][ T5356] syz.0.0: attempt to access beyond end of device [ 88.232019][ T5356] loop0: rw=8388608, sector=25900, nr_sectors = 1 limit=64 [ 88.232098][ T5356] Buffer I/O error on dev loop0, logical block 25900, async page read [ 88.232128][ T5356] syz.0.0: attempt to access beyond end of device [ 88.232128][ T5356] loop0: rw=8388608, sector=25901, nr_sectors = 1 limit=64 [ 88.232141][ T5356] Buffer I/O error on dev loop0, logical block 25901, async page read [ 88.232154][ T5356] syz.0.0: attempt to access beyond end of device [ 88.232154][ T5356] loop0: rw=8388608, sector=26983, nr_sectors = 1 limit=64 [ 88.232167][ T5356] Buffer I/O error on dev loop0, logical block 26983, async page read [ 88.232180][ T5356] syz.0.0: attempt to access beyond end of device [ 88.232180][ T5356] loop0: rw=8388608, sector=26984, nr_sectors = 1 limit=64 [ 88.232191][ T5356] Buffer I/O error on dev loop0, logical block 26984, async page read [ 88.232203][ T5356] syz.0.0: attempt to access beyond end of device [ 88.232203][ T5356] loop0: rw=8388608, sector=26985, nr_sectors = 1 limit=64 [ 88.232215][ T5356] Buffer I/O error on dev loop0, logical block 26985, async page read [ 88.232228][ T5356] syz.0.0: attempt to access beyond end of device [ 88.232228][ T5356] loop0: rw=8388608, sector=26986, nr_sectors = 1 limit=64 [ 88.232240][ T5356] Buffer I/O error on dev loop0, logical block 26986, async page read [ 88.396763][ T5356] syz.0.0: attempt to access beyond end of device [ 88.396763][ T5356] loop0: rw=8388608, sector=25900, nr_sectors = 1 limit=64 [ 88.396794][ T5356] Buffer I/O error on dev loop0, logical block 25900, async page read [ 88.396812][ T5356] syz.0.0: attempt to access beyond end of device [ 88.396812][ T5356] loop0: rw=8388608, sector=25901, nr_sectors = 1 limit=64 [ 88.396825][ T5356] Buffer I/O error on dev loop0, logical block 25901, async page read [ 88.396837][ T5356] syz.0.0: attempt to access beyond end of device [ 88.396837][ T5356] loop0: rw=8388608, sector=26983, nr_sectors = 1 limit=64 [ 88.396849][ T5356] Buffer I/O error on dev loop0, logical block 26983, async page read [ 88.396860][ T5356] syz.0.0: attempt to access beyond end of device [ 88.396860][ T5356] loop0: rw=8388608, sector=26984, nr_sectors = 1 limit=64 [ 88.396873][ T5356] Buffer I/O error on dev loop0, logical block 26984, async page read [ 88.596111][ T57] [ 88.597294][ T57] ============================================ [ 88.600059][ T57] WARNING: possible recursive locking detected [ 88.602764][ T57] syzkaller #0 Not tainted [ 88.604964][ T57] -------------------------------------------- [ 88.607832][ T57] kworker/u4:4/57 is trying to acquire lock: [ 88.610545][ T57] ffff8880382340a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 88.614786][ T57] [ 88.614786][ T57] but task is already holding lock: [ 88.617716][ T57] ffff8880382340a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 88.621799][ T57] [ 88.621799][ T57] other info that might help us debug this: [ 88.625557][ T57] Possible unsafe locking scenario: [ 88.625557][ T57] [ 88.628853][ T57] CPU0 [ 88.630302][ T57] ---- [ 88.631762][ T57] lock(&tree->tree_lock/1); [ 88.633858][ T57] lock(&tree->tree_lock/1); [ 88.635981][ T57] [ 88.635981][ T57] *** DEADLOCK *** [ 88.635981][ T57] [ 88.639446][ T57] May be due to missing lock nesting notation [ 88.639446][ T57] [ 88.643106][ T57] locks held by kworker/u4:4/57: 5, on CPU#0: [ 88.645774][ T57] #0: ffff88801e3bd948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 [ 88.650637][ T57] #1: ffffc90000b27c40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 [ 88.655941][ T57] #2: ffff88803ee24100 (&type->s_umount_key#52){.+.+}-{4:4}, at: super_trylock_shared+0x23/0xf0 [ 88.660232][ T57] #3: ffff8880382340a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 88.664156][ T57] #4: ffff8880525480a0 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf9/0x1680 [ 88.668673][ T57] [ 88.668673][ T57] stack backtrace: [ 88.671214][ T57] CPU: 0 UID: 0 PID: 57 Comm: kworker/u4:4 Not tainted syzkaller #0 PREEMPT(full) [ 88.675321][ T57] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 88.680048][ T57] Workqueue: writeback wb_workfn (flush-7:0) [ 88.682840][ T57] Call Trace: [ 88.684372][ T57] [ 88.685727][ T57] dump_stack_lvl+0xe8/0x150 [ 88.687753][ T57] print_deadlock_bug+0x27a/0x290 [ 88.690004][ T57] __lock_acquire+0x25db/0x2de0 [ 88.692154][ T57] ? _raw_spin_unlock_irqrestore+0x4c/0x80 [ 88.694761][ T57] ? stack_depot_save_flags+0x404/0x810 [ 88.697226][ T57] ? kasan_save_track+0x51/0x90 [ 88.699512][ T57] ? kasan_save_track+0x3f/0x90 [ 88.701960][ T57] ? __kasan_kmalloc+0x93/0xb0 [ 88.704515][ T57] ? __kmalloc_noprof+0x366/0x710 [ 88.706839][ T57] ? hfs_find_init+0x9d/0x300 [ 88.708784][ T57] ? hfs_extend_file+0x367/0x1680 [ 88.710984][ T57] ? hfs_bmap_reserve+0x108/0x430 [ 88.713128][ T57] ? __hfs_ext_write_extent+0x200/0x620 [ 88.715538][ T57] lock_acquire+0x115/0x350 [ 88.717617][ T57] ? hfs_find_init+0x18d/0x300 [ 88.719745][ T57] __mutex_lock+0x197/0x15a0 [ 88.721794][ T57] ? hfs_find_init+0x18d/0x300 [ 88.723861][ T57] ? hfs_find_init+0x18d/0x300 [ 88.725986][ T57] ? __pfx___mutex_lock+0x10/0x10 [ 88.728099][ T57] ? rcu_is_watching+0x16/0xb0 [ 88.730269][ T57] ? trace_kmalloc+0x2a/0xf0 [ 88.732288][ T57] ? __kmalloc_noprof+0x387/0x710 [ 88.734488][ T57] ? __kmalloc_noprof+0x1a6/0x710 [ 88.736606][ T57] ? hfs_find_init+0x9d/0x300 [ 88.738650][ T57] hfs_find_init+0x18d/0x300 [ 88.740751][ T57] hfs_extend_file+0x367/0x1680 [ 88.742946][ T57] ? hfs_bnode_read+0x3cf/0x810 [ 88.745206][ T57] ? __pfx_hfs_extend_file+0x10/0x10 [ 88.747566][ T57] ? __pfx___hfs_brec_find+0x10/0x10 [ 88.749925][ T57] ? hfs_brec_find+0x3cc/0x510 [ 88.752086][ T57] hfs_bmap_reserve+0x108/0x430 [ 88.754155][ T57] __hfs_ext_write_extent+0x200/0x620 [ 88.756305][ T57] hfs_ext_write_extent+0x17d/0x210 [ 88.758588][ T57] ? __pfx___mpage_writepages+0x10/0x10 [ 88.760880][ T57] ? __pfx_hfs_ext_write_extent+0x10/0x10 [ 88.763235][ T57] hfs_write_inode+0x117/0xa00 [ 88.765284][ T57] ? __pfx_hfs_write_inode+0x10/0x10 [ 88.767545][ T57] ? do_raw_spin_unlock+0x4d/0x200 [ 88.769881][ T57] __writeback_single_inode+0x69d/0x1220 [ 88.772235][ T57] writeback_sb_inodes+0x9de/0x1af0 [ 88.774541][ T57] ? __pfx_writeback_sb_inodes+0x10/0x10 [ 88.777021][ T57] ? __pfx_down_read_trylock+0x10/0x10 [ 88.779449][ T57] ? __pfx___up_read+0x10/0x10 [ 88.781610][ T57] __writeback_inodes_wb+0x114/0x250 [ 88.783944][ T57] wb_writeback+0x42f/0xad0 [ 88.785857][ T57] ? queue_io+0x1e1/0x470 [ 88.787777][ T57] ? __pfx_wb_writeback+0x10/0x10 [ 88.790091][ T57] ? do_raw_spin_lock+0x12b/0x2f0 [ 88.792304][ T57] wb_workfn+0x980/0x10f0 [ 88.794225][ T57] ? update_se+0x90/0x1080 [ 88.796250][ T57] ? __pfx_wb_workfn+0x10/0x10 [ 88.798357][ T57] ? update_protect_slice+0x45/0x320 [ 88.800725][ T57] ? lock_acquire+0x115/0x350 [ 88.802795][ T57] ? rcu_is_watching+0x16/0xb0 [ 88.804729][ T57] ? process_scheduled_works+0x97a/0x1630 [ 88.807246][ T57] process_scheduled_works+0xc3d/0x1630 [ 88.809707][ T57] ? __pfx_process_scheduled_works+0x10/0x10 [ 88.812477][ T57] ? assign_work+0x3cf/0x5d0 [ 88.814602][ T57] worker_thread+0xa47/0xfb0 [ 88.816590][ T57] ? __kthread_parkme+0x71/0x1f0 [ 88.818853][ T57] kthread+0x38b/0x480 [ 88.820755][ T57] ? __pfx_worker_thread+0x10/0x10 [ 88.823067][ T57] ? __pfx_kthread+0x10/0x10 [ 88.825129][ T57] ret_from_fork+0x514/0xb70 [ 88.827208][ T57] ? __pfx_ret_from_fork+0x10/0x10 [ 88.829536][ T57] ? __switch_to+0xc78/0x1410 [ 88.831698][ T57] ? __pfx_kthread+0x10/0x10 [ 88.833740][ T57] ret_from_fork_asm+0x1a/0x30 [ 88.835889][ T57]