NILFS (loop0): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds UDF-fs: warning (device loop2): udf_load_vrs: No anchor found UDF-fs: Scanning with blocksize 2048 failed UDF-fs: warning (device loop2): udf_load_vrs: No VRS found ====================================================== WARNING: possible circular locking dependency detected 4.14.296-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/7983 is trying to acquire lock: (&dat_lock_key){.+.+}, at: [] nilfs_count_free_blocks+0x68/0x180 fs/nilfs2/the_nilfs.c:707 but task is already holding lock: (&nilfs->ns_sem){++++}, at: [] nilfs_put_super+0x139/0x190 fs/nilfs2/super.c:483 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&nilfs->ns_sem){++++}: down_write+0x34/0x90 kernel/locking/rwsem.c:54 nilfs_set_error fs/nilfs2/super.c:95 [inline] __nilfs_error+0x176/0x399 fs/nilfs2/super.c:140 nilfs_bmap_convert_error fs/nilfs2/bmap.c:44 [inline] nilfs_bmap_lookup_contig+0x130/0x170 fs/nilfs2/bmap.c:104 nilfs_get_block+0x1bd/0x7a0 fs/nilfs2/inode.c:93 block_truncate_page+0x2a8/0x8f0 fs/buffer.c:2944 nilfs_truncate+0x204/0x450 fs/nilfs2/inode.c:896 nilfs_setattr+0x1d8/0x220 fs/nilfs2/inode.c:993 notify_change+0x56b/0xd10 fs/attr.c:315 do_truncate+0xff/0x1a0 fs/open.c:63 vfs_truncate+0x456/0x680 fs/open.c:120 do_sys_truncate.part.0+0xdc/0xf0 fs/open.c:143 do_sys_truncate fs/open.c:137 [inline] SYSC_truncate fs/open.c:155 [inline] SyS_truncate+0x23/0x40 fs/open.c:153 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #0 (&dat_lock_key){.+.+}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 down_read+0x36/0x80 kernel/locking/rwsem.c:24 nilfs_count_free_blocks+0x68/0x180 fs/nilfs2/the_nilfs.c:707 nilfs_set_log_cursor fs/nilfs2/super.c:248 [inline] nilfs_cleanup_super+0x123/0x450 fs/nilfs2/super.c:330 nilfs_put_super+0x141/0x190 fs/nilfs2/super.c:484 generic_shutdown_super+0x144/0x370 fs/super.c:446 kill_block_super+0x95/0xe0 fs/super.c:1161 deactivate_locked_super+0x6c/0xd0 fs/super.c:319 deactivate_super+0x7f/0xa0 fs/super.c:350 cleanup_mnt+0x186/0x2c0 fs/namespace.c:1183 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb 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.0/7983: #0: (&type->s_umount_key#55){+.+.}, at: [] deactivate_super+0x77/0xa0 fs/super.c:349 #1: (&nilfs->ns_sem){++++}, at: [] nilfs_put_super+0x139/0x190 fs/nilfs2/super.c:483 stack backtrace: CPU: 1 PID: 7983 Comm: syz-executor.0 Not tainted 4.14.296-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 down_read+0x36/0x80 kernel/locking/rwsem.c:24 nilfs_count_free_blocks+0x68/0x180 fs/nilfs2/the_nilfs.c:707 nilfs_set_log_cursor fs/nilfs2/super.c:248 [inline] nilfs_cleanup_super+0x123/0x450 fs/nilfs2/super.c:330 nilfs_put_super+0x141/0x190 fs/nilfs2/super.c:484 generic_shutdown_super+0x144/0x370 fs/super.c:446 kill_block_super+0x95/0xe0 fs/super.c:1161 deactivate_locked_super+0x6c/0xd0 fs/super.c:319 deactivate_super+0x7f/0xa0 fs/super.c:350 cleanup_mnt+0x186/0x2c0 fs/namespace.c:1183 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f9baf682a17 RSP: 002b:00007ffc9faa1818 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f9baf682a17 RDX: 00007ffc9faa18ea RSI: 000000000000000a RDI: 00007ffc9faa18e0 RBP: 00007ffc9faa18e0 R08: 00000000ffffffff R09: 00007ffc9faa16b0 R10: 0000555556ee7903 R11: 0000000000000246 R12: 00007f9baf6db826 R13: 00007ffc9faa29a0 R14: 0000555556ee7810 R15: 00007ffc9faa29e0 UDF-fs: Scanning with blocksize 4096 failed usb usb6: usbfs: process 10229 (syz-executor.5) did not claim interface 0 before use NILFS (loop0): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop0): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop0): nilfs_bmap_lookup_contig: broken bmap (inode number=16) L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html for details. Remounting filesystem read-only NILFS (loop0): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop0): nilfs_bmap_last_key: broken bmap (inode number=16) NILFS (loop0): error -5 truncating bmap (ino=16) NILFS (loop0): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue audit: type=1800 audit(1667267142.944:2): pid=10499 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="file0" dev="sda1" ino=13943 res=0 audit: type=1804 audit(1667267142.944:3): pid=10499 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir3931349053/syzkaller.E8TdaB/31/file0" dev="sda1" ino=13943 res=1 EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue audit: type=1800 audit(1667267143.364:4): pid=10577 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="file0" dev="sda1" ino=13958 res=0 EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue audit: type=1804 audit(1667267143.404:5): pid=10577 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir3931349053/syzkaller.E8TdaB/32/file0" dev="sda1" ino=13958 res=1 audit: type=1800 audit(1667267143.404:6): pid=10579 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="file0" dev="sda1" ino=13972 res=0 EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue audit: type=1804 audit(1667267143.404:7): pid=10579 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir1568206676/syzkaller.RULRtE/26/file0" dev="sda1" ino=13972 res=1 audit: type=1800 audit(1667267143.434:8): pid=10581 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="file0" dev="sda1" ino=13973 res=0 audit: type=1804 audit(1667267143.434:9): pid=10581 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir277707084/syzkaller.dgx04W/27/file0" dev="sda1" ino=13973 res=1 audit: type=1800 audit(1667267143.674:10): pid=10597 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=13974 res=0 audit: type=1804 audit(1667267143.684:11): pid=10597 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir1120146702/syzkaller.09Cjo2/27/file0" dev="sda1" ino=13974 res=1 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 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 (loop5): 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 NILFS (loop3): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop5): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop5): 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 (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop3): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds