NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds ====================================================== WARNING: possible circular locking dependency detected 4.14.299-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/8022 is trying to acquire lock: (&dat_lock_key){.+.+}, at: [] nilfs_count_free_blocks+0x68/0x180 fs/nilfs2/the_nilfs.c:707 usb usb9: check_ctrlrecip: process 11456 (syz-executor.3) requesting ep 01 but needs 81 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. usb usb9: usbfs: process 11456 (syz-executor.3) did not claim interface 0 before use 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 do_mpage_readpage+0x615/0x1470 fs/mpage.c:211 mpage_readpages+0x2d6/0x5f0 fs/mpage.c:383 read_pages mm/readahead.c:121 [inline] __do_page_cache_readahead+0x522/0x940 mm/readahead.c:199 ra_submit mm/internal.h:66 [inline] ondemand_readahead.isra.0+0x514/0xb60 mm/readahead.c:486 page_cache_sync_readahead mm/readahead.c:518 [inline] page_cache_sync_readahead+0xa6/0xf0 mm/readahead.c:503 generic_file_buffered_read mm/filemap.c:2003 [inline] generic_file_read_iter+0xfbc/0x21c0 mm/filemap.c:2273 call_read_iter include/linux/fs.h:1774 [inline] new_sync_read fs/read_write.c:401 [inline] __vfs_read+0x449/0x620 fs/read_write.c:413 integrity_kernel_read+0x11b/0x1b0 security/integrity/iint.c:199 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:381 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:410 [inline] ima_calc_file_hash+0x3ee/0x780 security/integrity/ima/ima_crypto.c:467 ima_collect_measurement+0x39d/0x430 security/integrity/ima/ima_api.c:227 process_measurement+0x78b/0xb20 security/integrity/ima/ima_main.c:264 do_last fs/namei.c:3435 [inline] path_openat+0x10ad/0x2970 fs/namei.c:3571 do_filp_open+0x179/0x3c0 fs/namei.c:3605 do_sys_open+0x296/0x410 fs/open.c:1081 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #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+0x5e/0xd3 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/8022: #0: (&type->s_umount_key#71){+.+.}, 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: 0 PID: 8022 Comm: syz-executor.4 Not tainted 4.14.299-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/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+0x5e/0xd3 audit: type=1804 audit(1668706979.734:64): pid=11437 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir3050889545/syzkaller.Hfr1IB/92/bus" dev="sda1" ino=14226 res=1 usb usb9: check_ctrlrecip: process 11481 (syz-executor.3) requesting ep 01 but needs 81 audit: type=1804 audit(1668706980.374:65): pid=11438 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir2575916142/syzkaller.0SaIJc/71/bus" dev="sda1" ino=14227 res=1 EXT4-fs warning (device loop5): ext4_update_dynamic_rev:793: updating to rev 1 because of new feature flag, running e2fsck is recommended usb usb9: usbfs: process 11481 (syz-executor.3) did not claim interface 0 before use audit: type=1804 audit(1668706981.475:66): pid=11463 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir3050889545/syzkaller.Hfr1IB/93/bus" dev="sda1" ino=14228 res=1 EXT4-fs (loop5): mounted filesystem without journal. Opts: ,errors=continue netlink: 1 bytes leftover after parsing attributes in process `syz-executor.2'. audit: type=1804 audit(1668706982.115:67): pid=11466 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir2575916142/syzkaller.0SaIJc/72/bus" dev="sda1" ino=14229 res=1 : renamed from bond_slave_1 A link change request failed with some changes committed already. Interface  may have been left with an inconsistent configuration, please check. audit: type=1800 audit(1668706982.795:68): pid=11503 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=14142 res=0 audit: type=1804 audit(1668706982.805:69): pid=11503 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir7059730/syzkaller.0QKnyM/61/file0" dev="sda1" ino=14142 res=1 audit: type=1804 audit(1668706982.805:70): pid=11503 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.1" name="/root/syzkaller-testdir7059730/syzkaller.0QKnyM/61/file0" dev="sda1" ino=14142 res=1 NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs warning (device loop5): ext4_update_dynamic_rev:793: updating to rev 1 because of new feature flag, running e2fsck is recommended audit: type=1804 audit(1668706983.245:71): pid=11522 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir2709955529/syzkaller.iIwSVg/87/bus" dev="sda1" ino=13878 res=1 EXT4-fs (loop5): mounted filesystem without journal. Opts: ,errors=continue netlink: 1 bytes leftover after parsing attributes in process `syz-executor.2'. A link change request failed with some changes committed already. Interface  may have been left with an inconsistent configuration, please check. netlink: 1 bytes leftover after parsing attributes in process `syz-executor.4'. : renamed from bond_slave_1 A link change request failed with some changes committed already. Interface  may have been left with an inconsistent configuration, please check. netlink: 1 bytes leftover after parsing attributes in process `syz-executor.2'. A link change request failed with some changes committed already. Interface  may have been left with an inconsistent configuration, please check. audit: type=1800 audit(1668706983.905:72): pid=11561 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="file0" dev="sda1" ino=14243 res=0 netlink: 1 bytes leftover after parsing attributes in process `syz-executor.4'. audit: type=1800 audit(1668706983.965:73): pid=11562 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=14244 res=0 netlink: 1 bytes leftover after parsing attributes in process `syz-executor.2'. A link change request failed with some changes committed already. Interface  may have been left with an inconsistent configuration, please check. netlink: 1 bytes leftover after parsing attributes in process `syz-executor.4'. EXT4-fs: failed to create workqueue EXT4-fs (loop5): mount failed A link change request failed with some changes committed already. Interface  may have been left with an inconsistent configuration, please check. EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs error (device loop3): ext4_validate_block_bitmap:405: comm syz-executor.3: bg 0: block 5: invalid block bitmap EXT4-fs (loop3): Delayed block allocation failed for inode 18 at logical offset 0 with max blocks 1 with error 117 EXT4-fs (loop3): This should not happen!! Data will be lost syz-executor.3 (11587) used greatest stack depth: 23840 bytes left EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs error (device loop1): ext4_validate_block_bitmap:405: comm syz-executor.1: bg 0: block 5: invalid block bitmap kauditd_printk_skb: 19 callbacks suppressed audit: type=1800 audit(1668706987.535:93): pid=11629 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="sda1" ino=14249 res=0 EXT4-fs (loop1): Delayed block allocation failed for inode 19 at logical offset 0 with max blocks 1 with error 117 audit: type=1800 audit(1668706987.675:94): pid=11630 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="file0" dev="sda1" ino=14250 res=0 EXT4-fs (loop1): This should not happen!! Data will be lost audit: type=1804 audit(1668706987.745:95): pid=11629 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir3417905353/syzkaller.zLpvVV/65/file0" dev="sda1" ino=14249 res=1 EXT4-fs warning (device loop5): ext4_update_dynamic_rev:793: updating to rev 1 because of new feature flag, running e2fsck is recommended audit: type=1804 audit(1668706987.865:96): pid=11630 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir3050889545/syzkaller.Hfr1IB/104/file0" dev="sda1" ino=14250 res=1 audit: type=1804 audit(1668706987.875:97): pid=11629 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir3417905353/syzkaller.zLpvVV/65/file0" dev="sda1" ino=14249 res=1 EXT4-fs (loop5): mounted filesystem without journal. Opts: ,errors=continue audit: type=1804 audit(1668706988.015:98): pid=11630 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.0" name="/root/syzkaller-testdir3050889545/syzkaller.Hfr1IB/104/file0" dev="sda1" ino=14250 res=1 syz-executor.1 (11610) used greatest stack depth: 23056 bytes left audit: type=1800 audit(1668706989.015:99): pid=11647 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="sda1" ino=13954 res=0 audit: type=1800 audit(1668706989.135:100): pid=11648 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="file0" dev="sda1" ino=14252 res=0