kworker/u4:12: attempt to access beyond end of device loop0: rw=8388609, sector=161, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 161, lost async page write kworker/u4:12: attempt to access beyond end of device loop0: rw=8388609, sector=162, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 162, lost async page write kworker/u4:12: attempt to access beyond end of device loop0: rw=8388609, sector=163, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 163, lost async page write kworker/u4:12: attempt to access beyond end of device loop0: rw=8388609, sector=167, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 167, lost async page write kworker/u4:12: attempt to access beyond end of device loop0: rw=8388609, sector=169, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 169, lost async page write kworker/u4:12: attempt to access beyond end of device loop0: rw=8388609, sector=171, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 171, lost async page write kworker/u4:12: attempt to access beyond end of device loop0: rw=8388609, sector=172, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 172, lost async page write ============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- kworker/u4:12/1067 is trying to acquire lock: ffff8880439620a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 fs/hfs/bfind.c:-1 but task is already holding lock: ffff8880439620a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 fs/hfs/bfind.c:-1 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&tree->tree_lock/1); lock(&tree->tree_lock/1); *** DEADLOCK *** May be due to missing lock nesting notation locks held by kworker/u4:12/1067: 5, last CPU#0: #0: ffff88801cfb5940 ((wq_completion)writeback){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #0: ffff88801cfb5940 ((wq_completion)writeback){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffff88801cfb5940 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3361 [inline] #0: ffff88801cfb5940 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3479 #1: ffffc9000166fc40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline] #1: ffffc9000166fc40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffc9000166fc40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3361 [inline] #1: ffffc9000166fc40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3479 #2: ffff888035f240e8 (&type->s_umount_key#54){.+.+}-{4:4}, at: super_trylock_shared+0x23/0xf0 fs/super.c:670 #3: ffff8880439620a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 fs/hfs/bfind.c:-1 #4: ffff888053c880a0 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf9/0x1680 fs/hfs/extent.c:397 stack backtrace: CPU: 0 UID: 0 PID: 1067 Comm: kworker/u4:12 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_deadlock_bug+0x27a/0x290 kernel/locking/lockdep.c:3085 check_deadlock kernel/locking/lockdep.c:3137 [inline] validate_chain kernel/locking/lockdep.c:3939 [inline] __lock_acquire+0x25db/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19c/0x15a0 kernel/locking/mutex.c:821 hfs_find_init+0x18d/0x300 fs/hfs/bfind.c:-1 hfs_ext_read_extent fs/hfs/extent.c:200 [inline] hfs_extend_file+0x367/0x1680 fs/hfs/extent.c:401 hfs_bmap_reserve+0x108/0x430 fs/hfs/btree.c:399 __hfs_ext_write_extent+0x1fc/0x470 fs/hfs/extent.c:121 hfs_ext_write_extent+0x17d/0x210 fs/hfs/extent.c:144 hfs_write_inode+0x117/0xa00 fs/hfs/inode.c:475 write_inode fs/fs-writeback.c:1620 [inline] __writeback_single_inode+0x69d/0x1220 fs/fs-writeback.c:1863 writeback_sb_inodes+0x9de/0x1b00 fs/fs-writeback.c:2111 __writeback_inodes_wb+0x114/0x240 fs/fs-writeback.c:2187 wb_writeback+0x42f/0xad0 fs/fs-writeback.c:2298 wb_check_start_all fs/fs-writeback.c:2424 [inline] wb_do_writeback fs/fs-writeback.c:2471 [inline] wb_workfn+0x980/0x10f0 fs/fs-writeback.c:2509 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245