program: mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./config\x00', 0x1ff) mount(0x0, &(0x7f00000000c0)='./config\x00', &(0x7f0000000100)='configfs\x00', 0x0, 0x0) mkdirat(0xffffffffffffff9c, &(0x7f0000000140)='./config/usb_gadget/g1\x00', 0x1ff) mkdirat(0xffffffffffffff9c, &(0x7f00000002c0)='./config/usb_gadget/g1/configs/c.1\x00', 0x1ff) mkdirat(0xffffffffffffff9c, &(0x7f0000000340)='./config/usb_gadget/g1/functions/midi2.usb0\x00', 0x1ff) r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./config/usb_gadget/g1/functions/midi2.usb0/ep.0/block.0/direction\x00', 0x2, 0x0) write(r0, &(0x7f0000000400)='1', 0x1) symlinkat(&(0x7f0000000440)='./config/usb_gadget/g1/functions/midi2.usb0\x00', 0xffffffffffffff9c, &(0x7f0000000480)='./config/usb_gadget/g1/configs/c.1/midi2.usb0\x00') syz_mount_image$hfs(&(0x7f0000000000), &(0x7f0000000040)='./file0\x00', 0x0, &(0x7f0000000540)=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) r1 = openat(0xffffffffffffff9c, &(0x7f0000000b80)='./bus\x00', 0x141842, 0x0) r2 = openat$cgroup_ro(0xffffffffffffff9c, &(0x7f0000000bc0)='cpuacct.usage_percpu\x00', 0x275a, 0x0) r3 = openat$cgroup_ro(0xffffffffffffff9c, &(0x7f0000000c00)='cpuacct.usage_percpu\x00', 0x275a, 0x0) write$binfmt_script(r3, &(0x7f0000000c40), 0xfea7) copy_file_range(r2, 0x0, r1, 0x0, 0xffffffffa003e459, 0x700000000000000) r4 = openat(0xffffffffffffff9c, &(0x7f0000000c80)='./file1\x00', 0x42, 0x0) write$FUSE_WRITE(r4, &(0x7f0000000cc0)={0x18}, 0xfffffdef) r5 = openat(0xffffffffffffff9c, &(0x7f00000004c0)='./config/usb_gadget/g1/UDC\x00', 0x2, 0x0) write(r5, &(0x7f0000000500)='dummy_udc.0', 0xb) [ 93.080659][ T5280] Bluetooth: hci0: command tx timeout [ 93.090476][ T1362] cfg80211: failed to load regulatory.db [ 93.149177][ T5316] loop0: detected capacity change from 0 to 64 [ 93.266028][ T5316] syz.0.0: attempt to access beyond end of device [ 93.266028][ T5316] loop0: rw=8390657, sector=163, nr_sectors = 1 limit=64 [ 93.266115][ T5316] Buffer I/O error on dev loop0, logical block 163, lost async page write [ 93.266142][ T5316] syz.0.0: attempt to access beyond end of device [ 93.266142][ T5316] loop0: rw=8390657, sector=167, nr_sectors = 1 limit=64 [ 93.266155][ T5316] Buffer I/O error on dev loop0, logical block 167, lost async page write [ 93.266167][ T5316] syz.0.0: attempt to access beyond end of device [ 93.266167][ T5316] loop0: rw=8390657, sector=169, nr_sectors = 1 limit=64 [ 93.266178][ T5316] Buffer I/O error on dev loop0, logical block 169, lost async page write [ 93.266188][ T5316] syz.0.0: attempt to access beyond end of device [ 93.266188][ T5316] loop0: rw=8390657, sector=171, nr_sectors = 1 limit=64 [ 93.266200][ T5316] Buffer I/O error on dev loop0, logical block 171, lost async page write [ 93.266210][ T5316] syz.0.0: attempt to access beyond end of device [ 93.266210][ T5316] loop0: rw=8390657, sector=172, nr_sectors = 1 limit=64 [ 93.266221][ T5316] Buffer I/O error on dev loop0, logical block 172, lost async page write [ 93.266233][ T5316] syz.0.0: attempt to access beyond end of device [ 93.266233][ T5316] loop0: rw=8390657, sector=173, nr_sectors = 1 limit=64 [ 93.266244][ T5316] Buffer I/O error on dev loop0, logical block 173, lost async page write [ 93.266256][ T5316] syz.0.0: attempt to access beyond end of device [ 93.266256][ T5316] loop0: rw=8390657, sector=174, nr_sectors = 1 limit=64 [ 93.266299][ T5316] Buffer I/O error on dev loop0, logical block 174, lost async page write [ 93.266313][ T5316] syz.0.0: attempt to access beyond end of device [ 93.266313][ T5316] loop0: rw=8390657, sector=175, nr_sectors = 1 limit=64 [ 93.266325][ T5316] Buffer I/O error on dev loop0, logical block 175, lost async page write [ 93.266979][ T5316] syz.0.0: attempt to access beyond end of device [ 93.266979][ T5316] loop0: rw=8390657, sector=176, nr_sectors = 1 limit=64 [ 93.266997][ T5316] Buffer I/O error on dev loop0, logical block 176, lost async page write [ 93.267011][ T5316] syz.0.0: attempt to access beyond end of device [ 93.267011][ T5316] loop0: rw=8390657, sector=177, nr_sectors = 1 limit=64 [ 93.267023][ T5316] Buffer I/O error on dev loop0, logical block 177, lost async page write [ 94.241026][ T43] [ 94.242001][ T43] ============================================ [ 94.244193][ T43] WARNING: possible recursive locking detected [ 94.246338][ T43] syzkaller #0 Not tainted [ 94.247883][ T43] -------------------------------------------- [ 94.250026][ T43] kworker/u4:3/43 is trying to acquire lock: [ 94.252326][ T43] ffff8880356d80a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 94.256152][ T43] [ 94.256152][ T43] but task is already holding lock: [ 94.259057][ T43] ffff8880356d80a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 94.262725][ T43] [ 94.262725][ T43] other info that might help us debug this: [ 94.265715][ T43] Possible unsafe locking scenario: [ 94.265715][ T43] [ 94.268421][ T43] CPU0 [ 94.269662][ T43] ---- [ 94.270970][ T43] lock(&tree->tree_lock/1); [ 94.272823][ T43] lock(&tree->tree_lock/1); [ 94.274653][ T43] [ 94.274653][ T43] *** DEADLOCK *** [ 94.274653][ T43] [ 94.277695][ T43] May be due to missing lock nesting notation [ 94.277695][ T43] [ 94.280825][ T43] locks held by kworker/u4:3/43: 5, last CPU#0: [ 94.283252][ T43] #0: ffff88801d386140 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 [ 94.287342][ T43] #1: ffffc90000877c40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 [ 94.291913][ T43] #2: ffff8880351660e8 (&type->s_umount_key#53){.+.+}-{4:4}, at: super_trylock_shared+0x23/0xf0 [ 94.295879][ T43] #3: ffff8880356d80a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 [ 94.299421][ T43] #4: ffff888013af80a0 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf9/0x1680 [ 94.303404][ T43] [ 94.303404][ T43] stack backtrace: [ 94.305617][ T43] CPU: 0 UID: 0 PID: 43 Comm: kworker/u4:3 Not tainted syzkaller #0 PREEMPT(full) [ 94.309146][ T43] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 94.312908][ T43] Workqueue: writeback wb_workfn (flush-7:0) [ 94.315265][ T43] Call Trace: [ 94.316554][ T43] [ 94.317688][ T43] dump_stack_lvl+0xe8/0x150 [ 94.319523][ T43] print_deadlock_bug+0x27a/0x290 [ 94.321433][ T43] __lock_acquire+0x25db/0x2de0 [ 94.323328][ T43] ? _raw_spin_unlock_irqrestore+0x4c/0x80 [ 94.325723][ T43] ? stack_depot_save_flags+0x404/0x7f0 [ 94.328017][ T43] ? kasan_save_track+0x4f/0x80 [ 94.329944][ T43] ? kasan_save_track+0x3e/0x80 [ 94.331839][ T43] ? __kasan_kmalloc+0x93/0xb0 [ 94.333776][ T43] ? __kmalloc_noprof+0x36b/0x720 [ 94.335911][ T43] ? hfs_find_init+0x9d/0x300 [ 94.337868][ T43] ? hfs_extend_file+0x367/0x1680 [ 94.339967][ T43] ? hfs_bmap_reserve+0x108/0x430 [ 94.342228][ T43] ? __hfs_ext_write_extent+0x1fc/0x470 [ 94.344518][ T43] lock_acquire+0x115/0x350 [ 94.346406][ T43] ? hfs_find_init+0x18d/0x300 [ 94.348216][ T43] __mutex_lock+0x19d/0x1550 [ 94.349944][ T43] ? hfs_find_init+0x18d/0x300 [ 94.351774][ T43] ? hfs_find_init+0x18d/0x300 [ 94.353558][ T43] ? __pfx___mutex_lock+0x10/0x10 [ 94.355414][ T43] ? rcu_is_watching+0x16/0xb0 [ 94.357104][ T43] ? trace_kmalloc+0x2a/0xf0 [ 94.358767][ T43] ? __kmalloc_noprof+0x38c/0x720 [ 94.360802][ T43] ? __kmalloc_noprof+0x1ab/0x720 [ 94.362864][ T43] ? hfs_find_init+0x9d/0x300 [ 94.364731][ T43] hfs_find_init+0x18d/0x300 [ 94.366527][ T43] hfs_extend_file+0x367/0x1680 [ 94.368573][ T43] ? __pfx_hfs_extend_file+0x10/0x10 [ 94.370819][ T43] ? _raw_spin_unlock+0x28/0x50 [ 94.372647][ T43] ? hfs_brec_find+0x3db/0x510 [ 94.374565][ T43] hfs_bmap_reserve+0x108/0x430 [ 94.376465][ T43] __hfs_ext_write_extent+0x1fc/0x470 [ 94.378545][ T43] hfs_ext_write_extent+0x17d/0x210 [ 94.380495][ T43] ? __pfx___mpage_writepages+0x10/0x10 [ 94.382632][ T43] ? __pfx_hfs_ext_write_extent+0x10/0x10 [ 94.384831][ T43] hfs_write_inode+0x117/0xa00 [ 94.386688][ T43] ? __pfx_hfs_write_inode+0x10/0x10 [ 94.388705][ T43] ? do_raw_spin_unlock+0x4d/0x200 [ 94.390729][ T43] __writeback_single_inode+0x69d/0x1220 [ 94.392905][ T43] writeback_sb_inodes+0x9de/0x1b00 [ 94.394940][ T43] ? __pfx_writeback_sb_inodes+0x10/0x10 [ 94.397053][ T43] ? irqentry_exit+0x218/0x920 [ 94.398944][ T43] ? __pfx_down_read_trylock+0x10/0x10 [ 94.400950][ T43] ? __pfx___up_read+0x10/0x10 [ 94.403140][ T43] __writeback_inodes_wb+0x114/0x240 [ 94.405062][ T43] wb_writeback+0x42f/0xad0 [ 94.406793][ T43] ? queue_io+0x2b1/0x470 [ 94.408466][ T43] ? __pfx_wb_writeback+0x10/0x10 [ 94.410290][ T43] ? do_raw_spin_lock+0x12b/0x2f0 [ 94.412254][ T43] wb_workfn+0x980/0x10f0 [ 94.414003][ T43] ? __pfx_wb_workfn+0x10/0x10 [ 94.415895][ T43] ? do_raw_spin_lock+0x12b/0x2f0 [ 94.417807][ T43] ? lock_acquire+0x115/0x350 [ 94.419685][ T43] ? rcu_is_watching+0x16/0xb0 [ 94.421679][ T43] ? process_scheduled_works+0x97a/0x1630 [ 94.423924][ T43] process_scheduled_works+0xc3d/0x1630 [ 94.426115][ T43] ? __pfx_process_scheduled_works+0x10/0x10 [ 94.428511][ T43] ? assign_work+0x3cf/0x5d0 [ 94.430371][ T43] worker_thread+0xa47/0xfb0 [ 94.432353][ T43] kthread+0x38b/0x480 [ 94.433972][ T43] ? __pfx_worker_thread+0x10/0x10 [ 94.436075][ T43] ? __pfx_kthread+0x10/0x10 [ 94.437935][ T43] ret_from_fork+0x514/0xb70 [ 94.439782][ T43] ? __pfx_ret_from_fork+0x10/0x10 [ 94.441806][ T43] ? __switch_to+0xc89/0x1420 [ 94.443739][ T43] ? __pfx_kthread+0x10/0x10 [ 94.445395][ T43] ret_from_fork_asm+0x1a/0x30 [ 94.447098][ T43]