BTRFS error (device loop5): superblock checksum mismatch audit: type=1800 audit(1667424685.973:6): pid=10180 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="bus" dev="loop3" ino=18 res=0 BTRFS error (device loop5): open_ctree failed ====================================================== WARNING: possible circular locking dependency detected 4.14.297-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/10179 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_sync_fs+0x92/0x4d0 fs/nilfs2/super.c:506 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_sync_fs+0x156/0x4d0 fs/nilfs2/super.c:510 sync_fs_one_sb fs/sync.c:80 [inline] sync_fs_one_sb+0xb1/0xe0 fs/sync.c:77 iterate_supers+0x124/0x490 fs/super.c:613 sys_sync+0x89/0x130 fs/sync.c:114 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 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.5/10179: #0: (&type->s_umount_key#69){++++}, at: [] iterate_supers+0xda/0x490 fs/super.c:611 #1: (&nilfs->ns_sem){++++}, at: [] nilfs_sync_fs+0x92/0x4d0 fs/nilfs2/super.c:506 stack backtrace: CPU: 1 PID: 10179 Comm: syz-executor.5 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_sync_fs+0x156/0x4d0 fs/nilfs2/super.c:510 sync_fs_one_sb fs/sync.c:80 [inline] sync_fs_one_sb+0xb1/0xe0 fs/sync.c:77 iterate_supers+0x124/0x490 fs/super.c:613 sys_sync+0x89/0x130 fs/sync.c:114 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 BTRFS error (device loop5): unsupported checksum algorithm 1 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. BTRFS error (device loop5): superblock checksum mismatch BTRFS error (device loop5): open_ctree failed BTRFS error (device loop5): unsupported checksum algorithm 1 BTRFS error (device loop5): superblock checksum mismatch audit: type=1800 audit(1667424686.723:7): pid=10367 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=14012 res=0 audit: type=1800 audit(1667424686.813:8): pid=10391 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=13996 res=0 BTRFS error (device loop5): open_ctree failed BTRFS error (device loop5): unsupported checksum algorithm 1 attempt to access beyond end of device BTRFS error (device loop5): superblock checksum mismatch loop0: rw=2049, want=124, limit=60 attempt to access beyond end of device loop0: rw=2049, want=128, limit=60 Buffer I/O error on dev loop0, logical block 31, lost async page write BTRFS error (device loop5): open_ctree failed BTRFS error (device loop5): unsupported checksum algorithm 1 BTRFS error (device loop5): superblock checksum mismatch BTRFS error (device loop5): open_ctree failed BTRFS error (device loop5): unsupported checksum algorithm 1 BTRFS error (device loop5): superblock checksum mismatch audit: type=1800 audit(1667424687.883:9): pid=10457 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=14030 res=0 BTRFS error (device loop5): open_ctree failed attempt to access beyond end of device loop0: rw=2049, want=124, limit=60 attempt to access beyond end of device BTRFS error (device loop5): unsupported checksum algorithm 1 loop0: rw=2049, want=128, limit=60 Buffer I/O error on dev loop0, logical block 31, lost async page write BTRFS error (device loop5): superblock checksum mismatch BTRFS error (device loop5): open_ctree failed BTRFS error (device loop3): unsupported checksum algorithm 1 BTRFS error (device loop3): superblock checksum mismatch attempt to access beyond end of device loop0: rw=2049, want=124, limit=60 attempt to access beyond end of device loop0: rw=2049, want=128, limit=60 Buffer I/O error on dev loop0, logical block 31, lost async page write BTRFS error (device loop3): open_ctree failed UDF-fs: error (device loop2): udf_process_sequence: Block 99 of volume descriptor sequence is corrupted or we could not read it BTRFS error (device loop3): unsupported checksum algorithm 1 BTRFS error (device loop3): superblock checksum mismatch audit: type=1800 audit(1667424688.933:10): pid=10543 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=13988 res=0 UDF-fs: error (device loop2): udf_process_sequence: Block 1984 of volume descriptor sequence is corrupted or we could not read it UDF-fs: Scanning with blocksize 512 failed UDF-fs: warning (device loop2): udf_load_vrs: No anchor found UDF-fs: Scanning with blocksize 1024 failed UDF-fs: error (device loop2): udf_read_tagged: read failed, block=512, location=512 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 UDF-fs: Scanning with blocksize 4096 failed BTRFS error (device loop3): open_ctree failed attempt to access beyond end of device attempt to access beyond end of device loop0: rw=2049, want=76, limit=60 loop0: rw=2049, want=124, limit=60 BTRFS error (device loop3): unsupported checksum algorithm 1 attempt to access beyond end of device UDF-fs: error (device loop2): udf_process_sequence: Block 99 of volume descriptor sequence is corrupted or we could not read it loop0: rw=2049, want=128, limit=60 Buffer I/O error on dev loop0, logical block 31, lost async page write BTRFS error (device loop3): superblock checksum mismatch UDF-fs: error (device loop2): udf_process_sequence: Block 1984 of volume descriptor sequence is corrupted or we could not read it UDF-fs: Scanning with blocksize 512 failed UDF-fs: warning (device loop2): udf_load_vrs: No anchor found BTRFS error (device loop3): open_ctree failed UDF-fs: Scanning with blocksize 1024 failed UDF-fs: error (device loop2): udf_read_tagged: read failed, block=512, location=512 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 UDF-fs: Scanning with blocksize 4096 failed BTRFS error (device loop4): unsupported checksum algorithm 1 BTRFS error (device loop4): superblock checksum mismatch BTRFS error (device loop4): open_ctree failed UDF-fs: error (device loop2): udf_process_sequence: Block 99 of volume descriptor sequence is corrupted or we could not read it audit: type=1800 audit(1667424690.793:11): pid=10599 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=14030 res=0 UDF-fs: error (device loop2): udf_process_sequence: Block 1984 of volume descriptor sequence is corrupted or we could not read it UDF-fs: Scanning with blocksize 512 failed UDF-fs: warning (device loop2): udf_load_vrs: No anchor found UDF-fs: Scanning with blocksize 1024 failed UDF-fs: error (device loop2): udf_read_tagged: read failed, block=512, location=512 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 UDF-fs: Scanning with blocksize 4096 failed UDF-fs: error (device loop2): udf_process_sequence: Block 99 of volume descriptor sequence is corrupted or we could not read it UDF-fs: error (device loop2): udf_process_sequence: Block 1984 of volume descriptor sequence is corrupted or we could not read it UDF-fs: Scanning with blocksize 512 failed UDF-fs: warning (device loop2): udf_load_vrs: No anchor found UDF-fs: Scanning with blocksize 1024 failed UDF-fs: error (device loop2): udf_read_tagged: read failed, block=512, location=512 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 UDF-fs: Scanning with blocksize 4096 failed input: syz1 as /devices/virtual/input/input8 netlink: 60 bytes leftover after parsing attributes in process `syz-executor.5'. Bluetooth: hci2 ACL packet for unknown connection handle 0 input: syz0 as /devices/virtual/input/input9 netlink: 3752 bytes leftover after parsing attributes in process `syz-executor.4'. IPVS: Unknown mcast interface: pim6reg1 vhci_hcd vhci_hcd.0: pdev(4) rhport(0) sockfd(3) vhci_hcd vhci_hcd.0: devid(0) speed(2) speed_str(full-speed) vhci_hcd vhci_hcd.0: Device attached vhci_hcd: connection closed vhci_hcd: stop threads vhci_hcd: release socket vhci_hcd: disconnect device