NILFS (loop0): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds ====================================================== WARNING: possible circular locking dependency detected 4.14.297-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/8010 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 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.0/8010: #0: (&type->s_umount_key#62){+.+.}, 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: 8010 Comm: syz-executor.0 Not tainted 4.14.297-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+0x5e/0xd3 NILFS (loop2): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds 8021q: adding VLAN 0 to HW filter on device team0 bond0: Enslaving team0 as an active interface with an up link NILFS (loop0): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue NILFS (loop2): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop0): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop2): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 EXT4-fs error (device loop3): ext4_validate_block_bitmap:405: comm syz-executor.3: bg 0: block 2: invalid block bitmap NILFS error (device loop0): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS error (device loop2): nilfs_bmap_lookup_contig: broken bmap (inode number=16) Remounting filesystem read-only Remounting filesystem read-only NILFS (loop0): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS (loop2): 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) NILFS error (device loop2): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop0): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS (loop2): 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) NILFS error (device loop2): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop0): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS (loop2): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS (loop0): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS (loop2): 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) NILFS error (device loop2): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS error (device loop0): nilfs_bmap_last_key: broken bmap (inode number=16) NILFS error (device loop2): nilfs_bmap_last_key: broken bmap (inode number=16) NILFS (loop0): error -5 truncating bmap (ino=16) NILFS (loop2): error -5 truncating bmap (ino=16) EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue kauditd_printk_skb: 16 callbacks suppressed audit: type=1800 audit(1667342410.251:28): pid=11563 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=13991 res=0 audit: type=1800 audit(1667342410.361:29): pid=11586 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="file0" dev="sda1" ino=13990 res=0 EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue audit: type=1800 audit(1667342410.421:30): pid=11595 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="file0" dev="sda1" ino=14136 res=0 EXT4-fs error (device loop0): ext4_xattr_ibody_find:2199: inode #12: comm syz-executor.0: corrupted in-inode xattr audit: type=1800 audit(1667342410.521:31): pid=11615 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=14081 res=0 audit: type=1800 audit(1667342410.621:32): pid=11636 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="file0" dev="sda1" ino=14140 res=0 EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs error (device loop0): ext4_xattr_ibody_find:2199: inode #12: comm syz-executor.0: corrupted in-inode xattr audit: type=1800 audit(1667342410.651:33): pid=11634 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="file0" dev="sda1" ino=14141 res=0 audit: type=1800 audit(1667342410.671:34): pid=11646 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=13990 res=0 audit: type=1800 audit(1667342410.871:35): pid=11680 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="file0" dev="sda1" ino=13991 res=0 EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue audit: type=1800 audit(1667342410.881:36): pid=11683 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="file0" dev="sda1" ino=13990 res=0 EXT4-fs error (device loop0): ext4_xattr_ibody_find:2199: inode #12: comm syz-executor.0: corrupted in-inode xattr MTD: Attempt to mount non-MTD device "/dev/loop5" romfs: Mounting image 'rom 5f663c08' through the block layer EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs error (device loop0): ext4_xattr_ibody_find:2199: inode #12: comm syz-executor.0: corrupted in-inode xattr MTD: Attempt to mount non-MTD device "/dev/loop5" romfs: Mounting image 'rom 5f663c08' through the block layer MTD: Attempt to mount non-MTD device "/dev/loop0" MTD: Attempt to mount non-MTD device "/dev/loop4" romfs: Mounting image 'rom 5f663c08' through the block layer romfs: Mounting image 'rom 5f663c08' through the block layer MTD: Attempt to mount non-MTD device "/dev/loop5" romfs: Mounting image 'rom 5f663c08' through the block layer MTD: Attempt to mount non-MTD device "/dev/loop4" romfs: Mounting image 'rom 5f663c08' through the block layer MTD: Attempt to mount non-MTD device "/dev/loop0" romfs: Mounting image 'rom 5f663c08' through the block layer MTD: Attempt to mount non-MTD device "/dev/loop5" romfs: Mounting image 'rom 5f663c08' through the block layer MTD: Attempt to mount non-MTD device "/dev/loop0" MTD: Attempt to mount non-MTD device "/dev/loop4" romfs: Mounting image 'rom 5f663c08' through the block layer romfs: Mounting image 'rom 5f663c08' through the block layer UDF-fs: error (device loop4): udf_read_tagged: read failed, block=256, location=256 UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/09/12 12:00 (1000) UDF-fs: error (device loop4): udf_read_tagged: read failed, block=256, location=256 UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/09/12 12:00 (1000) UDF-fs: error (device loop4): udf_read_tagged: read failed, block=256, location=256 UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/09/12 12:00 (1000) bridge0: port 2(bridge_slave_1) entered disabled state bridge0: port 1(bridge_slave_0) entered disabled state device bridge0 entered promiscuous mode device bridge_slave_1 left promiscuous mode bridge0: port 2(bridge_slave_1) entered disabled state UDF-fs: error (device loop4): udf_read_tagged: read failed, block=256, location=256 IPVS: ftp: loaded support on port[0] = 21 UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/09/12 12:00 (1000) device bridge_slave_0 left promiscuous mode bridge0: port 1(bridge_slave_0) entered disabled state audit: type=1804 audit(1667342412.881:37): pid=12001 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir2739612752/syzkaller.bzccCB/110/file1/bus" dev="loop5" ino=3 res=1 BTRFS: device fsid f90cac8b-044b-4fa8-8bee-4b8d3da88dc2 devid 1 transid 7 /dev/loop1 BTRFS info (device loop1): disk space caching is enabled attempt to access beyond end of device loop5: rw=0, want=88, limit=87 BTRFS info (device loop1): has skinny extents EXT4-fs warning (device sda1): ext4_group_add:1669: No reserved GDT blocks, can't resize attempt to access beyond end of device loop5: rw=0, want=88, limit=87 EXT4-fs warning (device sda1): ext4_group_add:1669: No reserved GDT blocks, can't resize bridge0: port 2(bridge_slave_1) entered disabled state bridge0: port 1(bridge_slave_0) entered disabled state device bridge0 entered promiscuous mode BTRFS info (device loop1): disk space caching is enabled device bridge_slave_1 left promiscuous mode BTRFS info (device loop1): has skinny extents bridge0: port 2(bridge_slave_1) entered disabled state attempt to access beyond end of device loop5: rw=0, want=88, limit=87 device bridge_slave_0 left promiscuous mode bridge0: port 1(bridge_slave_0) entered disabled state BTRFS info (device loop1): disk space caching is enabled EXT4-fs warning (device sda1): ext4_group_add:1669: No reserved GDT blocks, can't resize BTRFS info (device loop1): has skinny extents attempt to access beyond end of device loop5: rw=0, want=88, limit=87 EXT4-fs warning (device sda1): ext4_group_add:1669: No reserved GDT blocks, can't resize bridge0: port 2(bridge_slave_1) entered disabled state bridge0: port 1(bridge_slave_0) entered disabled state device bridge0 entered promiscuous mode device bridge_slave_1 left promiscuous mode bridge0: port 2(bridge_slave_1) entered disabled state device bridge_slave_0 left promiscuous mode bridge0: port 1(bridge_slave_0) entered disabled state BTRFS info (device loop1): disk space caching is enabled BTRFS info (device loop1): has skinny extents bond0: Releasing backup interface team0 batman_adv: batadv0: Adding interface: team0 batman_adv: batadv0: The MTU of interface team0 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem. batman_adv: batadv0: Not using interface team0 (retrying later): interface not active print_req_error: I/O error, dev loop5, sector 0 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 (loop1): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop4): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds mmap: syz-executor.3 (12590) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. NILFS (loop1): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop1): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds