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) write$RDMA_USER_CM_CMD_CREATE_ID(r3, &(0x7f0000000b00)={0x0, 0x18, 0xfa00, {0x3, 0x0, 0x2, 0x6}}, 0x20) [ 101.441740][ T4648] Bluetooth: hci0: command tx timeout [ 101.595066][ T5327] loop0: detected capacity change from 0 to 64 [ 101.724276][ T5327] syz.0.0: attempt to access beyond end of device [ 101.724276][ T5327] loop0: rw=8390657, sector=163, nr_sectors = 1 limit=64 [ 101.724372][ T5327] Buffer I/O error on dev loop0, logical block 163, lost async page write [ 101.724417][ T5327] syz.0.0: attempt to access beyond end of device [ 101.724417][ T5327] loop0: rw=8390657, sector=167, nr_sectors = 1 limit=64 [ 101.724436][ T5327] Buffer I/O error on dev loop0, logical block 167, lost async page write [ 101.724452][ T5327] syz.0.0: attempt to access beyond end of device [ 101.724452][ T5327] loop0: rw=8390657, sector=169, nr_sectors = 1 limit=64 [ 101.724467][ T5327] Buffer I/O error on dev loop0, logical block 169, lost async page write [ 101.724480][ T5327] syz.0.0: attempt to access beyond end of device [ 101.724480][ T5327] loop0: rw=8390657, sector=171, nr_sectors = 1 limit=64 [ 101.724495][ T5327] Buffer I/O error on dev loop0, logical block 171, lost async page write [ 101.724508][ T5327] syz.0.0: attempt to access beyond end of device [ 101.724508][ T5327] loop0: rw=8390657, sector=172, nr_sectors = 1 limit=64 [ 101.724522][ T5327] Buffer I/O error on dev loop0, logical block 172, lost async page write [ 101.724535][ T5327] syz.0.0: attempt to access beyond end of device [ 101.724535][ T5327] loop0: rw=8390657, sector=173, nr_sectors = 1 limit=64 [ 101.724550][ T5327] Buffer I/O error on dev loop0, logical block 173, lost async page write [ 101.724561][ T5327] syz.0.0: attempt to access beyond end of device [ 101.724561][ T5327] loop0: rw=8390657, sector=174, nr_sectors = 1 limit=64 [ 101.724572][ T5327] Buffer I/O error on dev loop0, logical block 174, lost async page write [ 101.724583][ T5327] syz.0.0: attempt to access beyond end of device [ 101.724583][ T5327] loop0: rw=8390657, sector=175, nr_sectors = 1 limit=64 [ 101.724599][ T5327] Buffer I/O error on dev loop0, logical block 175, lost async page write [ 101.725003][ T5327] syz.0.0: attempt to access beyond end of device [ 101.725003][ T5327] loop0: rw=8390657, sector=176, nr_sectors = 1 limit=64 [ 101.725024][ T5327] Buffer I/O error on dev loop0, logical block 176, lost async page write [ 101.725038][ T5327] syz.0.0: attempt to access beyond end of device [ 101.725038][ T5327] loop0: rw=8390657, sector=177, nr_sectors = 1 limit=64 [ 101.725055][ T5327] Buffer I/O error on dev loop0, logical block 177, lost async page write [ 102.770185][ T13] [ 102.771465][ T13] ============================================ [ 102.774151][ T13] WARNING: possible recursive locking detected [ 102.776883][ T13] syzkaller #0 Not tainted [ 102.778814][ T13] -------------------------------------------- [ 102.781451][ T13] kworker/u4:1/13 is trying to acquire lock: [ 102.783984][ T13] ffff8880331d40a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 102.788048][ T13] [ 102.788048][ T13] but task is already holding lock: [ 102.793536][ T13] ffff8880331d40a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 102.797915][ T13] [ 102.797915][ T13] other info that might help us debug this: [ 102.801275][ T13] Possible unsafe locking scenario: [ 102.801275][ T13] [ 102.804219][ T13] CPU0 [ 102.805407][ T13] ---- [ 102.806772][ T13] lock(&tree->tree_lock/1); [ 102.808539][ T13] lock(&tree->tree_lock/1); [ 102.810594][ T13] [ 102.810594][ T13] *** DEADLOCK *** [ 102.810594][ T13] [ 102.814022][ T13] May be due to missing lock nesting notation [ 102.814022][ T13] [ 102.817526][ T13] locks held by kworker/u4:1/13: 5, last CPU#0: [ 102.820222][ T13] #0: ffff88801d379940 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 [ 102.824963][ T13] #1: ffffc9000026fc40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 [ 102.830284][ T13] #2: ffff888041b560e8 (&type->s_umount_key#53){.+.+}-{4:4}, at: super_trylock_shared+0x23/0xf0 [ 102.836826][ T13] #3: ffff8880331d40a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 102.841116][ T13] #4: ffff8880139640a0 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf9/0x1680 [ 102.845892][ T13] [ 102.845892][ T13] stack backtrace: [ 102.848510][ T13] CPU: 0 UID: 0 PID: 13 Comm: kworker/u4:1 Not tainted syzkaller #0 PREEMPT(full) [ 102.852485][ T13] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 102.856946][ T13] Workqueue: writeback wb_workfn (flush-7:0) [ 102.859626][ T13] Call Trace: [ 102.861307][ T13] [ 102.862680][ T13] dump_stack_lvl+0xe8/0x150 [ 102.864867][ T13] print_deadlock_bug+0x27a/0x290 [ 102.867072][ T13] __lock_acquire+0x25db/0x2de0 [ 102.869234][ T13] ? _raw_spin_unlock_irqrestore+0x4c/0x80 [ 102.871998][ T13] ? stack_depot_save_flags+0x404/0x7f0 [ 102.874383][ T13] ? kasan_save_track+0x4f/0x80 [ 102.876471][ T13] ? kasan_save_track+0x3e/0x80 [ 102.878493][ T13] ? __kasan_kmalloc+0x93/0xb0 [ 102.880598][ T13] ? __kmalloc_noprof+0x36b/0x720 [ 102.882759][ T13] ? hfs_find_init+0x9d/0x300 [ 102.884739][ T13] ? hfs_extend_file+0x367/0x1680 [ 102.886888][ T13] ? hfs_bmap_reserve+0x108/0x430 [ 102.889021][ T13] ? __hfs_ext_write_extent+0x1fc/0x470 [ 102.891379][ T13] lock_acquire+0x115/0x350 [ 102.893279][ T13] ? hfs_find_init+0x18d/0x300 [ 102.895283][ T13] __mutex_lock+0x19d/0x1550 [ 102.897244][ T13] ? hfs_find_init+0x18d/0x300 [ 102.899211][ T13] ? hfs_find_init+0x18d/0x300 [ 102.901179][ T13] ? __pfx___mutex_lock+0x10/0x10 [ 102.903330][ T13] ? rcu_is_watching+0x16/0xb0 [ 102.905373][ T13] ? trace_kmalloc+0x2a/0xf0 [ 102.907376][ T13] ? __kmalloc_noprof+0x38c/0x720 [ 102.909493][ T13] ? __kmalloc_noprof+0x1ab/0x720 [ 102.911674][ T13] ? hfs_find_init+0x9d/0x300 [ 102.913572][ T13] hfs_find_init+0x18d/0x300 [ 102.915648][ T13] hfs_extend_file+0x367/0x1680 [ 102.917710][ T13] ? __pfx_hfs_extend_file+0x10/0x10 [ 102.919893][ T13] ? _raw_spin_unlock+0x28/0x50 [ 102.921910][ T13] ? hfs_brec_find+0x3db/0x510 [ 102.923662][ T13] hfs_bmap_reserve+0x108/0x430 [ 102.925643][ T13] __hfs_ext_write_extent+0x1fc/0x470 [ 102.927981][ T13] hfs_ext_write_extent+0x17d/0x210 [ 102.930156][ T13] ? __pfx___mpage_writepages+0x10/0x10 [ 102.932473][ T13] ? __pfx_hfs_ext_write_extent+0x10/0x10 [ 102.934941][ T13] hfs_write_inode+0x117/0xa00 [ 102.937008][ T13] ? __pfx_hfs_write_inode+0x10/0x10 [ 102.939281][ T13] ? do_raw_spin_unlock+0x4d/0x200 [ 102.941451][ T13] __writeback_single_inode+0x69d/0x1220 [ 102.943910][ T13] writeback_sb_inodes+0x9de/0x1b00 [ 102.946112][ T13] ? __pfx_writeback_sb_inodes+0x10/0x10 [ 102.948415][ T13] ? __pfx_down_read_trylock+0x10/0x10 [ 102.950667][ T13] ? __pfx___up_read+0x10/0x10 [ 102.952870][ T13] __writeback_inodes_wb+0x114/0x240 [ 102.955068][ T13] wb_writeback+0x42f/0xad0 [ 102.957052][ T13] ? queue_io+0x211/0x470 [ 102.958949][ T13] ? __pfx_wb_writeback+0x10/0x10 [ 102.961107][ T13] ? do_raw_spin_lock+0x12b/0x2f0 [ 102.963447][ T13] wb_workfn+0x980/0x10f0 [ 102.965441][ T13] ? __pfx_wb_workfn+0x10/0x10 [ 102.967487][ T13] ? do_raw_spin_lock+0x12b/0x2f0 [ 102.969723][ T13] ? lock_acquire+0x115/0x350 [ 102.971873][ T13] ? rcu_is_watching+0x16/0xb0 [ 102.973919][ T13] ? process_scheduled_works+0x97a/0x1630 [ 102.976306][ T13] process_scheduled_works+0xc3d/0x1630 [ 102.978693][ T13] ? __pfx_process_scheduled_works+0x10/0x10 [ 102.981292][ T13] ? assign_work+0x3cf/0x5d0 [ 102.983323][ T13] worker_thread+0xa47/0xfb0 [ 102.985306][ T13] kthread+0x38b/0x480 [ 102.987069][ T13] ? __pfx_worker_thread+0x10/0x10 [ 102.989205][ T13] ? __pfx_kthread+0x10/0x10 [ 102.991225][ T13] ret_from_fork+0x514/0xb70 [ 102.993217][ T13] ? __pfx_ret_from_fork+0x10/0x10 [ 102.995421][ T13] ? __switch_to+0xc89/0x1420 [ 102.997375][ T13] ? __pfx_kthread+0x10/0x10 [ 102.999350][ T13] ret_from_fork_asm+0x1a/0x30 [ 103.001344][ T13] qemu-system-x86_64: ahci: PRDT length for NCQ command (0x0) is smaller than the requested size (0xbd000) [ 103.096214][ T1026] ata1.00: Read log 0x10 page 0x00 failed, Emask 0x1 [ 103.096238][ T1026] ata1: failed to read log page 10h (errno=-5) [ 103.096249][ T1026] ata1.00: exception Emask 0x1 SAct 0xc000 SErr 0x0 action 0x0 [ 103.096259][ T1026] ata1.00: irq_stat 0x41000000 [ 103.096269][ T1026] ata1.00: failed command: WRITE FPDMA QUEUED [ 103.096276][ T1026] ata1.00: cmd 61/e8:70:36:01:08/05:00:00:00:00/40 tag 14 ncq dma 774144 out [ 103.096276][ T1026] res 50/00:00:00:00:00/00:00:00:00:00/00 Emask 0x1 (device error) [ 103.096306][ T1026] ata1.00: status: { DRDY } [ 103.096316][ T1026] ata1.00: failed command: WRITE FPDMA QUEUED [ 103.096321][ T1026] ata1.00: cmd 61/c0:78:1e:07:08/02:00:00:00:00/40 tag 15 ncq dma 360448 out [ 103.096321][ T1026] res 50/00:00:00:00:00/00:00:00:00:00/00 Emask 0x1 (device error) [ 103.096344][ T1026] ata1.00: status: { DRDY } [ 103.097285][ T1026] ata1.00: configured for UDMA/100 [ 103.097618][ T1026] ata1: EH complete [ 103.465666][ T4648] Bluetooth: hci0: command tx timeout [ 105.545556][ T4648] Bluetooth: hci0: command tx timeout