reiserfs: using flush barriers REISERFS (device loop5): journal params: device loop5, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 ====================================================== WARNING: possible circular locking dependency detected REISERFS (device loop5): checking transaction log (loop5) 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ kworker/0:1/30096 is trying to acquire lock: 000000005959ad73 (&sb->s_type->i_mutex_key#10){++++}, at: inode_lock include/linux/fs.h:748 [inline] 000000005959ad73 (&sb->s_type->i_mutex_key#10){++++}, at: __generic_file_fsync+0xb0/0x1f0 fs/libfs.c:989 but task is already holding lock: 00000000da5f7f40 ((work_completion)(&dio->complete_work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 ((work_completion)(&dio->complete_work)){+.+.}: worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 -> #1 ((wq_completion)"dio/%s"sb->s_id){+.+.}: drain_workqueue+0x1a5/0x460 kernel/workqueue.c:2826 destroy_workqueue+0x75/0x790 kernel/workqueue.c:4183 sb_init_dio_done_wq+0x72/0x90 fs/direct-io.c:634 do_blockdev_direct_IO fs/direct-io.c:1285 [inline] __blockdev_direct_IO+0x5f55/0xef40 fs/direct-io.c:1419 REISERFS (device loop5): Using r5 hash to sort names ext4_direct_IO_write fs/ext4/inode.c:3777 [inline] ext4_direct_IO+0xae4/0x1c50 fs/ext4/inode.c:3915 generic_file_direct_write+0x208/0x4a0 mm/filemap.c:3073 __generic_file_write_iter+0x2d0/0x610 mm/filemap.c:3252 ext4_file_write_iter+0x2fe/0xf20 fs/ext4/file.c:272 REISERFS (device loop5): Created .reiserfs_priv - reserved for xattr storage. call_write_iter include/linux/fs.h:1821 [inline] aio_write+0x37f/0x5c0 fs/aio.c:1574 __io_submit_one fs/aio.c:1858 [inline] io_submit_one+0xecd/0x20c0 fs/aio.c:1909 __do_sys_io_submit fs/aio.c:1953 [inline] __se_sys_io_submit+0x11b/0x4a0 fs/aio.c:1924 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe JFS: discard option not supported on device -> #0 (&sb->s_type->i_mutex_key#10){++++}: down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] __generic_file_fsync+0xb0/0x1f0 fs/libfs.c:989 ext4_sync_file+0xa35/0x1420 fs/ext4/fsync.c:118 JFS: discard option not supported on device vfs_fsync_range+0x13a/0x220 fs/sync.c:197 generic_write_sync include/linux/fs.h:2750 [inline] dio_complete+0x763/0xac0 fs/direct-io.c:329 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 EXT4-fs error (device loop3): ext4_mb_generate_buddy:744: group 0, block bitmap and bg descriptor inconsistent: 100 vs 41 free clusters other info that might help us debug this: Chain exists of: &sb->s_type->i_mutex_key#10 --> (wq_completion)"dio/%s"sb->s_id --> (work_completion)(&dio->complete_work) Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((work_completion)(&dio->complete_work)); lock((wq_completion)"dio/%s"sb->s_id); lock((work_completion)(&dio->complete_work)); lock(&sb->s_type->i_mutex_key#10); EXT4-fs (loop3): 1 orphan inode deleted *** DEADLOCK *** 2 locks held by kworker/0:1/30096: #0: 0000000007d4c096 ((wq_completion)"dio/%s"sb->s_id){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124 #1: 00000000da5f7f40 ((work_completion)(&dio->complete_work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue stack backtrace: CPU: 0 PID: 30096 Comm: kworker/0:1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: dio/sda1 dio_aio_complete_work EXT4-fs error (device loop3): ext4_lookup:1621: inode #2: comm syz-executor.3: deleted inode referenced: 15 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] __generic_file_fsync+0xb0/0x1f0 fs/libfs.c:989 ext4_sync_file+0xa35/0x1420 fs/ext4/fsync.c:118 vfs_fsync_range+0x13a/0x220 fs/sync.c:197 generic_write_sync include/linux/fs.h:2750 [inline] dio_complete+0x763/0xac0 fs/direct-io.c:329 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. REISERFS (device loop5): found reiserfs format "3.6" with non-standard journal netlink: 24 bytes leftover after parsing attributes in process `syz-executor.1'. REISERFS (device loop5): using ordered data mode reiserfs: using flush barriers REISERFS (device loop5): journal params: device loop5, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop5): checking transaction log (loop5) JFS: discard option not supported on device JFS: discard option not supported on device REISERFS (device loop5): Using r5 hash to sort names REISERFS (device loop5): Created .reiserfs_priv - reserved for xattr storage. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. tmpfs: No value for mount option 'ÿ0xffffffffffffffff' netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. REISERFS (device loop5): found reiserfs format "3.6" with non-standard journal REISERFS (device loop5): using ordered data mode reiserfs: using flush barriers REISERFS (device loop5): journal params: device loop5, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 JFS: discard option not supported on device JFS: discard option not supported on device REISERFS (device loop5): checking transaction log (loop5) REISERFS (device loop5): Using r5 hash to sort names REISERFS (device loop5): Created .reiserfs_priv - reserved for xattr storage. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. REISERFS (device loop5): found reiserfs format "3.6" with non-standard journal netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. REISERFS (device loop5): using ordered data mode reiserfs: using flush barriers REISERFS (device loop5): journal params: device loop5, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop5): checking transaction log (loop5) REISERFS (device loop5): Using r5 hash to sort names REISERFS (device loop5): Created .reiserfs_priv - reserved for xattr storage. REISERFS (device loop5): found reiserfs format "3.6" with non-standard journal REISERFS (device loop5): using ordered data mode reiserfs: using flush barriers REISERFS (device loop5): journal params: device loop5, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop5): checking transaction log (loop5) XFS (loop3): invalid log iosize: 1 [not 12-30] REISERFS (device loop5): Using r5 hash to sort names REISERFS (device loop5): Created .reiserfs_priv - reserved for xattr storage. REISERFS (device loop5): found reiserfs format "3.6" with non-standard journal REISERFS (device loop5): using ordered data mode reiserfs: using flush barriers REISERFS (device loop5): journal params: device loop5, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop5): checking transaction log (loop5) REISERFS (device loop5): Using r5 hash to sort names REISERFS (device loop5): Created .reiserfs_priv - reserved for xattr storage. FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 XFS (loop3): invalid log iosize: 1 [not 12-30] CPU: 1 PID: 24287 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1590 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] kmem_cache_alloc+0x277/0x370 mm/slab.c:3557 getname_flags+0xce/0x590 fs/namei.c:140 user_path_at_empty+0x2a/0x50 fs/namei.c:2609 user_path_at include/linux/namei.h:57 [inline] do_fchownat+0xe1/0x1e0 fs/open.c:675 __do_sys_fchownat fs/open.c:696 [inline] __se_sys_fchownat fs/open.c:693 [inline] __x64_sys_fchownat+0xba/0x150 fs/open.c:693 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f53d5dba0a9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f53d432c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000104 RAX: ffffffffffffffda RBX: 00007f53d5ed9f80 RCX: 00007f53d5dba0a9 RDX: ffffffffffffffff RSI: 0000000020000000 RDI: ffffffffffffff9c RBP: 00007f53d432c1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffff00 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc444ea50f R14: 00007f53d432c300 R15: 0000000000022000 nla_parse: 8 callbacks suppressed netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. REISERFS (device loop5): found reiserfs format "3.6" with non-standard journal netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. REISERFS (device loop5): using ordered data mode reiserfs: using flush barriers REISERFS (device loop5): journal params: device loop5, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop5): checking transaction log (loop5) netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. REISERFS (device loop5): Using r5 hash to sort names REISERFS (device loop5): Created .reiserfs_priv - reserved for xattr storage. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. XFS (loop3): invalid log iosize: 1 [not 12-30] FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 24371 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:3088 [inline] prepare_alloc_pages mm/page_alloc.c:4346 [inline] __alloc_pages_nodemask+0x239/0x2890 mm/page_alloc.c:4393 __alloc_pages include/linux/gfp.h:496 [inline] __alloc_pages_node include/linux/gfp.h:509 [inline] kmem_getpages mm/slab.c:1412 [inline] cache_grow_begin+0xa4/0x8a0 mm/slab.c:2682 cache_alloc_refill+0x273/0x340 mm/slab.c:3049 ____cache_alloc mm/slab.c:3132 [inline] __do_cache_alloc mm/slab.c:3354 [inline] slab_alloc mm/slab.c:3389 [inline] kmem_cache_alloc+0x346/0x370 mm/slab.c:3557 getname_flags+0xce/0x590 fs/namei.c:140 user_path_at_empty+0x2a/0x50 fs/namei.c:2609 user_path_at include/linux/namei.h:57 [inline] do_fchownat+0xe1/0x1e0 fs/open.c:675 __do_sys_fchownat fs/open.c:696 [inline] __se_sys_fchownat fs/open.c:693 [inline] __x64_sys_fchownat+0xba/0x150 fs/open.c:693 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f53d5dba0a9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f53d432c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000104 RAX: ffffffffffffffda RBX: 00007f53d5ed9f80 RCX: 00007f53d5dba0a9 RDX: ffffffffffffffff RSI: 0000000020000000 RDI: ffffffffffffff9c RBP: 00007f53d432c1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffff00 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc444ea50f R14: 00007f53d432c300 R15: 0000000000022000 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. REISERFS (device loop5): found reiserfs format "3.6" with non-standard journal REISERFS (device loop5): using ordered data mode reiserfs: using flush barriers REISERFS (device loop5): journal params: device loop5, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop5): checking transaction log (loop5) REISERFS (device loop5): Using r5 hash to sort names REISERFS (device loop5): Created .reiserfs_priv - reserved for xattr storage. XFS (loop3): invalid log iosize: 1 [not 12-30]