NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/5557 is trying to acquire lock: 00000000ceab8ce5 (&nilfs->ns_sem){++++}, at: nilfs_set_error fs/nilfs2/super.c:86 [inline] 00000000ceab8ce5 (&nilfs->ns_sem){++++}, at: __nilfs_error+0x195/0x401 fs/nilfs2/super.c:131 but task is already holding lock: 00000000e8b7a584 (&dat_lock_key){.+.+}, at: nilfs_get_block+0x18f/0x970 fs/nilfs2/inode.c:79 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&dat_lock_key){.+.+}: 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 load_nilfs+0x79f/0x11f0 fs/nilfs2/the_nilfs.c:317 nilfs_fill_super fs/nilfs2/super.c:1063 [inline] nilfs_mount+0x9b5/0xe70 fs/nilfs2/super.c:1321 mount_fs+0xa3/0x310 fs/super.c:1261 vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2492 [inline] do_mount+0x115c/0x2f50 fs/namespace.c:2822 ksys_mount+0xcf/0x130 fs/namespace.c:3038 __do_sys_mount fs/namespace.c:3052 [inline] __se_sys_mount fs/namespace.c:3049 [inline] __x64_sys_mount+0xba/0x150 fs/namespace.c:3049 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&nilfs->ns_sem){++++}: down_write+0x34/0x90 kernel/locking/rwsem.c:70 nilfs_set_error fs/nilfs2/super.c:86 [inline] __nilfs_error+0x195/0x401 fs/nilfs2/super.c:131 nilfs_bmap_convert_error fs/nilfs2/bmap.c:35 [inline] nilfs_bmap_lookup_contig+0x13d/0x180 fs/nilfs2/bmap.c:95 nilfs_get_block+0x1ce/0x970 fs/nilfs2/inode.c:80 do_mpage_readpage+0x8fb/0x1ca0 fs/mpage.c:231 mpage_readpages+0x33a/0x630 fs/mpage.c:404 read_pages.isra.0+0xf6/0x5d0 mm/readahead.c:123 __do_page_cache_readahead+0x5c6/0x6c0 mm/readahead.c:211 ra_submit mm/internal.h:66 [inline] ondemand_readahead.isra.0+0x575/0xd40 mm/readahead.c:493 page_cache_sync_readahead mm/readahead.c:528 [inline] page_cache_sync_readahead+0x275/0x520 mm/readahead.c:510 generic_file_buffered_read mm/filemap.c:2115 [inline] generic_file_read_iter+0x1497/0x2b60 mm/filemap.c:2385 call_read_iter include/linux/fs.h:1815 [inline] new_sync_read fs/read_write.c:406 [inline] __vfs_read+0x518/0x750 fs/read_write.c:418 integrity_kernel_read+0x147/0x1f0 security/integrity/iint.c:200 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:364 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:393 [inline] ima_calc_file_hash+0x4b2/0x8a0 security/integrity/ima/ima_crypto.c:450 ima_collect_measurement+0x4c4/0x570 security/integrity/ima/ima_api.c:231 process_measurement+0xddd/0x1440 security/integrity/ima/ima_main.c:284 ima_file_check+0xb9/0x100 security/integrity/ima/ima_main.c:391 do_last fs/namei.c:3425 [inline] path_openat+0x7e4/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 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&dat_lock_key); lock(&nilfs->ns_sem); lock(&dat_lock_key); lock(&nilfs->ns_sem); *** DEADLOCK *** 2 locks held by syz-executor.5/5557: #0: 00000000da9c6297 (&iint->mutex){+.+.}, at: process_measurement+0x316/0x1440 security/integrity/ima/ima_main.c:224 #1: 00000000e8b7a584 (&dat_lock_key){.+.+}, at: nilfs_get_block+0x18f/0x970 fs/nilfs2/inode.c:79 stack backtrace: CPU: 1 PID: 5557 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 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 nilfs_set_error fs/nilfs2/super.c:86 [inline] __nilfs_error+0x195/0x401 fs/nilfs2/super.c:131 nilfs_bmap_convert_error fs/nilfs2/bmap.c:35 [inline] nilfs_bmap_lookup_contig+0x13d/0x180 fs/nilfs2/bmap.c:95 nilfs_get_block+0x1ce/0x970 fs/nilfs2/inode.c:80 do_mpage_readpage+0x8fb/0x1ca0 fs/mpage.c:231 mpage_readpages+0x33a/0x630 fs/mpage.c:404 read_pages.isra.0+0xf6/0x5d0 mm/readahead.c:123 __do_page_cache_readahead+0x5c6/0x6c0 mm/readahead.c:211 ra_submit mm/internal.h:66 [inline] ondemand_readahead.isra.0+0x575/0xd40 mm/readahead.c:493 page_cache_sync_readahead mm/readahead.c:528 [inline] page_cache_sync_readahead+0x275/0x520 mm/readahead.c:510 generic_file_buffered_read mm/filemap.c:2115 [inline] generic_file_read_iter+0x1497/0x2b60 mm/filemap.c:2385 call_read_iter include/linux/fs.h:1815 [inline] new_sync_read fs/read_write.c:406 [inline] __vfs_read+0x518/0x750 fs/read_write.c:418 integrity_kernel_read+0x147/0x1f0 security/integrity/iint.c:200 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:364 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:393 [inline] ima_calc_file_hash+0x4b2/0x8a0 security/integrity/ima/ima_crypto.c:450 ima_collect_measurement+0x4c4/0x570 security/integrity/ima/ima_api.c:231 process_measurement+0xddd/0x1440 security/integrity/ima/ima_main.c:284 ima_file_check+0xb9/0x100 security/integrity/ima/ima_main.c:391 do_last fs/namei.c:3425 [inline] path_openat+0x7e4/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 RIP: 0033:0x7f8033bc50a9 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:00007f8032137168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f8033ce4f80 RCX: 00007f8033bc50a9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007f8033c20ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd9a84f72f R14: 00007f8032137300 R15: 0000000000022000 Remounting filesystem read-only openvswitch: netlink: Either Ethernet header or EtherType is required. NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 team0: Port device bridge1 added NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) openvswitch: netlink: Either Ethernet header or EtherType is required. NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 openvswitch: netlink: Either Ethernet header or EtherType is required. NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) audit: type=1800 audit(1672128527.638:1361): pid=5557 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed comm="syz-executor.5" name="file3" dev="loop5" ino=16 res=0 team0: Port device bridge2 added NILFS (loop5): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 team0: Port device bridge3 added NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) Remounting filesystem read-only NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 overlayfs: failed to resolve './file0': -2 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) libceph: connect [d::]:6789 error -101 libceph: mon0 [d::]:6789 connect error NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) overlayfs: './file0' not a directory NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 overlayfs: failed to resolve './file0': -2 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 audit: type=1800 audit(1672128528.839:1362): pid=5686 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="bus" dev="sda1" ino=14427 res=0 libceph: connect [d::]:6789 error -101 libceph: mon0 [d::]:6789 connect error NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 Process accounting resumed ceph: No mds server is up or the cluster is laggy NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) audit: type=1800 audit(1672128529.439:1363): pid=5661 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed comm="syz-executor.5" name="file3" dev="loop5" ino=16 res=0 audit: type=1800 audit(1672128529.469:1364): pid=5762 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="bus" dev="sda1" ino=14444 res=0 libceph: connect [d::]:6789 error -101 libceph: mon0 [d::]:6789 connect error NILFS (loop5): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds audit: type=1800 audit(1672128529.609:1365): pid=5798 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="bus" dev="sda1" ino=14562 res=0 NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) Remounting filesystem read-only NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 IPVS: ftp: loaded support on port[0] = 21 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 libceph: connect [d::]:6789 error -101 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) libceph: mon0 [d::]:6789 connect error NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) NILFS (loop5): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop5): nilfs_bmap_lookup_contig: broken bmap (inode number=16) audit: type=1800 audit(1672128530.069:1366): pid=5792 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed comm="syz-executor.5" name="file3" dev="loop5" ino=16 res=0 EXT4-fs (loop5): orphan cleanup on readonly fs EXT4-fs warning (device loop5): ext4_enable_quotas:5883: Failed to enable quota tracking (type=2, err=-22). Please run e2fsck to fix. EXT4-fs (loop5): Cannot turn on quotas: error -22 EXT4-fs (loop5): 1 truncate cleaned up EXT4-fs (loop5): mounted filesystem without journal. Opts: ,errors=continue ceph: No mds server is up or the cluster is laggy EXT4-fs (loop5): orphan cleanup on readonly fs EXT4-fs warning (device loop5): ext4_enable_quotas:5883: Failed to enable quota tracking (type=2, err=-22). Please run e2fsck to fix. EXT4-fs (loop5): Cannot turn on quotas: error -22 EXT4-fs (loop5): 1 truncate cleaned up EXT4-fs (loop5): mounted filesystem without journal. Opts: ,errors=continue IPVS: ftp: loaded support on port[0] = 21 EXT4-fs (loop5): orphan cleanup on readonly fs EXT4-fs warning (device loop5): ext4_enable_quotas:5883: Failed to enable quota tracking (type=2, err=-22). Please run e2fsck to fix. EXT4-fs (loop5): Cannot turn on quotas: error -22 EXT4-fs (loop5): 1 truncate cleaned up EXT4-fs (loop5): mounted filesystem without journal. Opts: ,errors=continue IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 ceph: No mds server is up or the cluster is laggy IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. audit: type=1800 audit(1672128534.559:1367): pid=6207 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=13964 res=0 overlayfs: unrecognized mount option ";™IˆniŸ%ƒM" or missing value netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. overlayfs: unrecognized mount option ";™IˆniŸ%ƒM" or missing value audit: type=1800 audit(1672128535.049:1368): pid=6314 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=14461 res=0 IPVS: ftp: loaded support on port[0] = 21 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'.