NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds netlink: 28 bytes leftover after parsing attributes in process `syz-executor.0'. ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/31736 is trying to acquire lock: 00000000234c4f65 (&dat_lock_key){.+.+}, at: nilfs_count_free_blocks+0x68/0x180 fs/nilfs2/the_nilfs.c:698 but task is already holding lock: 00000000a9adb04a (&nilfs->ns_sem){++++}, at: nilfs_put_super+0x14a/0x1a0 fs/nilfs2/super.c:472 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&nilfs->ns_sem){++++}: nilfs_set_error fs/nilfs2/super.c:86 [inline] __nilfs_error+0x195/0x401 fs/nilfs2/super.c:131 nilfs_ifile_get_inode_block+0x12a/0x170 fs/nilfs2/ifile.c:139 __nilfs_read_inode fs/nilfs2/inode.c:483 [inline] nilfs_iget+0x204/0x860 fs/nilfs2/inode.c:592 nilfs_lookup fs/nilfs2/namei.c:63 [inline] nilfs_lookup+0xfd/0x130 fs/nilfs2/namei.c:54 lookup_open+0x698/0x1a20 fs/namei.c:3214 do_last fs/namei.c:3327 [inline] path_openat+0x1804/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&dat_lock_key){.+.+}: down_read+0x36/0x80 kernel/locking/rwsem.c:24 nilfs_count_free_blocks+0x68/0x180 fs/nilfs2/the_nilfs.c:698 nilfs_set_log_cursor fs/nilfs2/super.c:237 [inline] nilfs_cleanup_super+0x133/0x490 fs/nilfs2/super.c:319 nilfs_put_super+0x152/0x1a0 fs/nilfs2/super.c:473 generic_shutdown_super+0x144/0x370 fs/super.c:456 kill_block_super+0x97/0xf0 fs/super.c:1185 deactivate_locked_super+0x94/0x160 fs/super.c:329 deactivate_super+0x174/0x1a0 fs/super.c:360 cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&nilfs->ns_sem); lock(&dat_lock_key); lock(&nilfs->ns_sem); lock(&dat_lock_key); *** DEADLOCK *** 2 locks held by syz-executor.4/31736: #0: 00000000f331562a (&type->s_umount_key#95){+.+.}, at: deactivate_super+0x16c/0x1a0 fs/super.c:359 #1: 00000000a9adb04a (&nilfs->ns_sem){++++}, at: nilfs_put_super+0x14a/0x1a0 fs/nilfs2/super.c:472 stack backtrace: CPU: 0 PID: 31736 Comm: syz-executor.4 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 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_read+0x36/0x80 kernel/locking/rwsem.c:24 nilfs_count_free_blocks+0x68/0x180 fs/nilfs2/the_nilfs.c:698 nilfs_set_log_cursor fs/nilfs2/super.c:237 [inline] nilfs_cleanup_super+0x133/0x490 fs/nilfs2/super.c:319 nilfs_put_super+0x152/0x1a0 fs/nilfs2/super.c:473 generic_shutdown_super+0x144/0x370 fs/super.c:456 kill_block_super+0x97/0xf0 fs/super.c:1185 deactivate_locked_super+0x94/0x160 fs/super.c:329 deactivate_super+0x174/0x1a0 fs/super.c:360 cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fa2dc7cc517 Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 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:00007fff36cb6bc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fa2dc7cc517 RDX: 00007fff36cb6c99 RSI: 000000000000000a RDI: 00007fff36cb6c90 RBP: 00007fff36cb6c90 R08: 00000000ffffffff R09: 00007fff36cb6a60 R10: 0000555557148873 R11: 0000000000000246 R12: 00007fa2dc825b24 R13: 00007fff36cb7d50 R14: 0000555557148810 R15: 00007fff36cb7d90 netlink: 28 bytes leftover after parsing attributes in process `syz-executor.0'. NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds IPVS: ftp: loaded support on port[0] = 21 netlink: 28 bytes leftover after parsing attributes in process `syz-executor.0'. IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop3): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop3): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop3): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds IPVS: ftp: loaded support on port[0] = 21 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop3): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds x_tables: unsorted entry at hook 2 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds audit: type=1800 audit(1672807157.023:723): pid=514 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=14412 res=0 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 x_tables: unsorted entry at hook 2 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds x_tables: unsorted entry at hook 2 audit: type=1800 audit(1672807157.783:724): pid=695 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=14597 res=0 audit: type=1800 audit(1672807157.823:725): pid=695 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=14597 res=0 audit: type=1800 audit(1672807157.823:726): pid=695 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=14597 res=0 IPVS: ftp: loaded support on port[0] = 21 audit: type=1800 audit(1672807157.823:727): pid=695 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=14597 res=0 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds IPVS: ftp: loaded support on port[0] = 21 audit: type=1800 audit(1672807157.823:728): pid=695 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=14597 res=0 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.0'. audit: type=1800 audit(1672807157.823:729): pid=695 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=14597 res=0 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds audit: type=1800 audit(1672807157.823:730): pid=695 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=14597 res=0 audit: type=1800 audit(1672807157.823:731): pid=695 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=14597 res=0 audit: type=1800 audit(1672807157.823:732): pid=695 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=14597 res=0 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.0'. IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds netlink: 12 bytes leftover after parsing attributes in process `syz-executor.0'. IPVS: ftp: loaded support on port[0] = 21 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds IPVS: ftp: loaded support on port[0] = 21 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds IPVS: ftp: loaded support on port[0] = 21 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 1266 Comm: syz-executor.4 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 do_sys_open+0x26c/0x520 fs/open.c:1079 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fa2dc7cb0a9 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:00007fa2dad3d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fa2dc8eaf80 RCX: 00007fa2dc7cb0a9 RDX: 0000000000000000 RSI: 00000000200003c0 RDI: 0000000000000004 RBP: 00007fa2dad3d1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff36cb7a6f R14: 00007fa2dad3d300 R15: 0000000000022000 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 0 IPVS: ftp: loaded support on port[0] = 21 CPU: 0 PID: 1349 Comm: syz-executor.4 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 do_sys_open+0x26c/0x520 fs/open.c:1079 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fa2dc7cb0a9 IPVS: ftp: loaded support on port[0] = 21 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:00007fa2dad3d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fa2dc8eaf80 RCX: 00007fa2dc7cb0a9 RDX: 0000000000000000 RSI: 00000000200003c0 RDI: 0000000000000004 RBP: 00007fa2dad3d1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff36cb7a6f R14: 00007fa2dad3d300 R15: 0000000000022000 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 NILFS error (device loop4): nilfs_ifile_get_inode_block: bad inode number: 1 Remounting filesystem read-only IPVS: ftp: loaded support on port[0] = 21 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 1493 Comm: syz-executor.4 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 kmem_cache_zalloc include/linux/slab.h:699 [inline] __alloc_file+0x21/0x340 fs/file_table.c:100 alloc_empty_file+0x6d/0x170 fs/file_table.c:150 path_openat+0xe9/0x2df0 fs/namei.c:3526 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fa2dc7cb0a9 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:00007fa2dad3d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fa2dc8eaf80 RCX: 00007fa2dc7cb0a9 RDX: 0000000000000000 RSI: 00000000200003c0 RDI: 0000000000000004 RBP: 00007fa2dad3d1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff36cb7a6f R14: 00007fa2dad3d300 R15: 0000000000022000 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 1540 Comm: syz-executor.4 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_trace+0x284/0x380 mm/slab.c:3623 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] aa_alloc_file_ctx security/apparmor/include/file.h:60 [inline] apparmor_file_alloc_security+0x394/0xad0 security/apparmor/lsm.c:438 security_file_alloc+0x40/0x90 security/security.c:880 __alloc_file+0xd8/0x340 fs/file_table.c:105 alloc_empty_file+0x6d/0x170 fs/file_table.c:150 path_openat+0xe9/0x2df0 fs/namei.c:3526 ---------------- Code disassembly (best guess): 0: 28 00 sub %al,(%rax) 2: 00 00 add %al,(%rax) 4: 75 05 jne 0xb 6: 48 83 c4 28 add $0x28,%rsp a: c3 retq b: e8 f1 19 00 00 callq 0x1a01 10: 90 nop 11: 48 89 f8 mov %rdi,%rax 14: 48 89 f7 mov %rsi,%rdi 17: 48 89 d6 mov %rdx,%rsi 1a: 48 89 ca mov %rcx,%rdx 1d: 4d 89 c2 mov %r8,%r10 20: 4d 89 c8 mov %r9,%r8 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9 28: 0f 05 syscall * 2a: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction 30: 73 01 jae 0x33 32: c3 retq 33: 48 c7 c1 b8 ff ff ff mov $0xffffffffffffffb8,%rcx 3a: f7 d8 neg %eax 3c: 64 89 01 mov %eax,%fs:(%rcx) 3f: 48 rex.W