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.335180][ T4665] Bluetooth: hci0: command tx timeout [ 87.416729][ T5345] loop0: detected capacity change from 0 to 64 [ 88.577961][ T5345] syz.0.0: attempt to access beyond end of device [ 88.577961][ T5345] loop0: rw=8388608, sector=25900, nr_sectors = 1 limit=64 [ 88.578032][ T5345] Buffer I/O error on dev loop0, logical block 25900, async page read [ 88.578063][ T5345] syz.0.0: attempt to access beyond end of device [ 88.578063][ T5345] loop0: rw=8388608, sector=25901, nr_sectors = 1 limit=64 [ 88.578078][ T5345] Buffer I/O error on dev loop0, logical block 25901, async page read [ 88.578093][ T5345] syz.0.0: attempt to access beyond end of device [ 88.578093][ T5345] loop0: rw=8388608, sector=26983, nr_sectors = 1 limit=64 [ 88.578107][ T5345] Buffer I/O error on dev loop0, logical block 26983, async page read [ 88.578120][ T5345] syz.0.0: attempt to access beyond end of device [ 88.578120][ T5345] loop0: rw=8388608, sector=26984, nr_sectors = 1 limit=64 [ 88.578132][ T5345] Buffer I/O error on dev loop0, logical block 26984, async page read [ 88.578145][ T5345] syz.0.0: attempt to access beyond end of device [ 88.578145][ T5345] loop0: rw=8388608, sector=26985, nr_sectors = 1 limit=64 [ 88.578158][ T5345] Buffer I/O error on dev loop0, logical block 26985, async page read [ 88.578172][ T5345] syz.0.0: attempt to access beyond end of device [ 88.578172][ T5345] loop0: rw=8388608, sector=26986, nr_sectors = 1 limit=64 [ 88.578186][ T5345] Buffer I/O error on dev loop0, logical block 26986, async page read [ 88.811948][ T5345] syz.0.0: attempt to access beyond end of device [ 88.811948][ T5345] loop0: rw=8388608, sector=25900, nr_sectors = 1 limit=64 [ 88.811979][ T5345] Buffer I/O error on dev loop0, logical block 25900, async page read [ 88.811997][ T5345] syz.0.0: attempt to access beyond end of device [ 88.811997][ T5345] loop0: rw=8388608, sector=25901, nr_sectors = 1 limit=64 [ 88.812012][ T5345] Buffer I/O error on dev loop0, logical block 25901, async page read [ 88.812025][ T5345] syz.0.0: attempt to access beyond end of device [ 88.812025][ T5345] loop0: rw=8388608, sector=26983, nr_sectors = 1 limit=64 [ 88.812038][ T5345] Buffer I/O error on dev loop0, logical block 26983, async page read [ 88.812051][ T5345] syz.0.0: attempt to access beyond end of device [ 88.812051][ T5345] loop0: rw=8388608, sector=26984, nr_sectors = 1 limit=64 [ 88.812064][ T5345] Buffer I/O error on dev loop0, logical block 26984, async page read [ 89.054104][ T40] [ 89.055263][ T40] ============================================ [ 89.057957][ T40] WARNING: possible recursive locking detected [ 89.060665][ T40] syzkaller #0 Not tainted [ 89.062518][ T40] -------------------------------------------- [ 89.065106][ T40] kworker/u4:3/40 is trying to acquire lock: [ 89.067524][ T40] ffff8880423260a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 89.071763][ T40] [ 89.071763][ T40] but task is already holding lock: [ 89.075244][ T40] ffff8880423260a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 89.079445][ T40] [ 89.079445][ T40] other info that might help us debug this: [ 89.083045][ T40] Possible unsafe locking scenario: [ 89.083045][ T40] [ 89.086523][ T40] CPU0 [ 89.088041][ T40] ---- [ 89.089659][ T40] lock(&tree->tree_lock/1); [ 89.091832][ T40] lock(&tree->tree_lock/1); [ 89.093974][ T40] [ 89.093974][ T40] *** DEADLOCK *** [ 89.093974][ T40] [ 89.097183][ T40] May be due to missing lock nesting notation [ 89.097183][ T40] [ 89.100971][ T40] locks held by kworker/u4:3/40: 5, on CPU#0: [ 89.103657][ T40] #0: ffff88801e325948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 [ 89.108315][ T40] #1: ffffc90000427c40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 [ 89.113545][ T40] #2: ffff88803bb6e100 (&type->s_umount_key#53){.+.+}-{4:4}, at: super_trylock_shared+0x23/0xf0 [ 89.118303][ T40] #3: ffff8880423260a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 89.122671][ T40] #4: ffff8880533d40a0 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf9/0x1680 [ 89.127625][ T40] [ 89.127625][ T40] stack backtrace: [ 89.130424][ T40] CPU: 0 UID: 0 PID: 40 Comm: kworker/u4:3 Not tainted syzkaller #0 PREEMPT(full) [ 89.134612][ T40] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 89.139253][ T40] Workqueue: writeback wb_workfn (flush-7:0) [ 89.142028][ T40] Call Trace: [ 89.143578][ T40] [ 89.145008][ T40] dump_stack_lvl+0xe8/0x150 [ 89.147140][ T40] print_deadlock_bug+0x27a/0x290 [ 89.149477][ T40] __lock_acquire+0x25db/0x2de0 [ 89.151815][ T40] ? _raw_spin_unlock_irqrestore+0x4c/0x80 [ 89.154417][ T40] ? stack_depot_save_flags+0x404/0x810 [ 89.156983][ T40] ? kasan_save_track+0x51/0x90 [ 89.159158][ T40] ? kasan_save_track+0x3f/0x90 [ 89.161424][ T40] ? __kasan_kmalloc+0x93/0xb0 [ 89.163698][ T40] ? __kmalloc_noprof+0x366/0x710 [ 89.166170][ T40] ? hfs_find_init+0x9d/0x300 [ 89.168489][ T40] ? hfs_extend_file+0x367/0x1680 [ 89.171247][ T40] ? hfs_bmap_reserve+0x108/0x430 [ 89.173504][ T40] ? __hfs_ext_write_extent+0x200/0x620 [ 89.176040][ T40] lock_acquire+0x115/0x350 [ 89.178155][ T40] ? hfs_find_init+0x18d/0x300 [ 89.180380][ T40] __mutex_lock+0x197/0x15a0 [ 89.182473][ T40] ? hfs_find_init+0x18d/0x300 [ 89.184632][ T40] ? hfs_find_init+0x18d/0x300 [ 89.186589][ T40] ? __pfx___mutex_lock+0x10/0x10 [ 89.188851][ T40] ? rcu_is_watching+0x16/0xb0 [ 89.191083][ T40] ? trace_kmalloc+0x2a/0xf0 [ 89.192993][ T40] ? __kmalloc_noprof+0x387/0x710 [ 89.194980][ T40] ? __kmalloc_noprof+0x1a6/0x710 [ 89.197305][ T40] ? hfs_find_init+0x9d/0x300 [ 89.199441][ T40] hfs_find_init+0x18d/0x300 [ 89.201502][ T40] hfs_extend_file+0x367/0x1680 [ 89.203593][ T40] ? hfs_bnode_read+0x3cf/0x810 [ 89.205667][ T40] ? __pfx_hfs_extend_file+0x10/0x10 [ 89.208105][ T40] ? __pfx___hfs_brec_find+0x10/0x10 [ 89.210530][ T40] ? hfs_brec_find+0x3cc/0x510 [ 89.212720][ T40] hfs_bmap_reserve+0x108/0x430 [ 89.214879][ T40] __hfs_ext_write_extent+0x200/0x620 [ 89.217288][ T40] hfs_ext_write_extent+0x17d/0x210 [ 89.219639][ T40] ? __pfx___mpage_writepages+0x10/0x10 [ 89.222078][ T40] ? __pfx_hfs_ext_write_extent+0x10/0x10 [ 89.224601][ T40] hfs_write_inode+0x117/0xa00 [ 89.226773][ T40] ? __pfx_hfs_write_inode+0x10/0x10 [ 89.229066][ T40] ? do_raw_spin_unlock+0x4d/0x200 [ 89.231084][ T40] __writeback_single_inode+0x69d/0x1220 [ 89.233564][ T40] writeback_sb_inodes+0x9de/0x1af0 [ 89.235762][ T40] ? __pfx_writeback_sb_inodes+0x10/0x10 [ 89.238275][ T40] ? __pfx_down_read_trylock+0x10/0x10 [ 89.240670][ T40] ? __pfx___up_read+0x10/0x10 [ 89.242901][ T40] __writeback_inodes_wb+0x114/0x250 [ 89.245309][ T40] wb_writeback+0x42f/0xad0 [ 89.247410][ T40] ? queue_io+0x1e1/0x470 [ 89.249131][ T40] ? __pfx_wb_writeback+0x10/0x10 [ 89.251263][ T40] ? do_raw_spin_lock+0x12b/0x2f0 [ 89.253415][ T40] wb_workfn+0x980/0x10f0 [ 89.255316][ T40] ? __lock_acquire+0x747/0x2de0 [ 89.257321][ T40] ? __pfx_wb_workfn+0x10/0x10 [ 89.259529][ T40] ? do_raw_spin_lock+0x12b/0x2f0 [ 89.261760][ T40] ? lock_acquire+0x115/0x350 [ 89.263716][ T40] ? rcu_is_watching+0x16/0xb0 [ 89.265769][ T40] ? process_scheduled_works+0x97a/0x1630 [ 89.268171][ T40] process_scheduled_works+0xc3d/0x1630 [ 89.270570][ T40] ? __pfx_process_scheduled_works+0x10/0x10 [ 89.273079][ T40] ? assign_work+0x3cf/0x5d0 [ 89.275052][ T40] worker_thread+0xa47/0xfb0 [ 89.277124][ T40] ? __kthread_parkme+0x71/0x1f0 [ 89.279279][ T40] kthread+0x38b/0x480 [ 89.280939][ T40] ? __pfx_worker_thread+0x10/0x10 [ 89.283124][ T40] ? __pfx_kthread+0x10/0x10 [ 89.285034][ T40] ret_from_fork+0x514/0xb70 [ 89.287129][ T40] ? __pfx_ret_from_fork+0x10/0x10 [ 89.289437][ T40] ? __switch_to+0xc78/0x1410 [ 89.291523][ T40] ? __pfx_kthread+0x10/0x10 [ 89.293500][ T40] ret_from_fork_asm+0x1a/0x30 [ 89.295506][ T40]