NILFS (loop1): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 XFS (loop2): sunit and swidth must be specified together NILFS error (device loop1): nilfs_bmap_lookup_contig: broken bmap (inode number=16) ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.1/25840 is trying to acquire lock: 00000000224029c1 (&nilfs->ns_sem){++++}, at: nilfs_set_error fs/nilfs2/super.c:86 [inline] 00000000224029c1 (&nilfs->ns_sem){++++}, at: __nilfs_error+0x195/0x401 fs/nilfs2/super.c:131 but task is already holding lock: 00000000bcd97d87 (&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 nilfs_put_super+0x152/0x1a0 fs/nilfs2/super.c:473 generic_shutdown_super+0x144/0x370 fs/super.c:456 kill_block_super+0x97/0xf0 fs/super.c:1185 deactivate_locked_super+0x94/0x160 fs/super.c:329 deactivate_super+0x174/0x1a0 fs/super.c:360 cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 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 block_truncate_page+0x366/0xb00 fs/buffer.c:2887 nilfs_truncate+0x25d/0x4e0 fs/nilfs2/inode.c:739 nilfs_setattr+0x246/0x2a0 fs/nilfs2/inode.c:835 notify_change+0x70b/0xfc0 fs/attr.c:334 do_truncate+0x134/0x1f0 fs/open.c:63 vfs_truncate+0x54b/0x6d0 fs/open.c:109 do_sys_truncate fs/open.c:132 [inline] do_sys_truncate+0x145/0x170 fs/open.c:120 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 *** 5 locks held by syz-executor.1/25840: #0: 00000000520ab517 (sb_writers#19){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000520ab517 (sb_writers#19){.+.+}, at: mnt_want_write+0x3a/0xb0 fs/namespace.c:360 #1: 0000000047b98a1a (&sb->s_type->i_mutex_key#25){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #1: 0000000047b98a1a (&sb->s_type->i_mutex_key#25){+.+.}, at: do_truncate+0x125/0x1f0 fs/open.c:61 #2: 000000005694e3d4 (sb_internal#4){.+.+}, at: sb_start_intwrite include/linux/fs.h:1626 [inline] #2: 000000005694e3d4 (sb_internal#4){.+.+}, at: nilfs_transaction_begin+0x1f8/0xa50 fs/nilfs2/segment.c:225 #3: 00000000b335507f (&nilfs->ns_segctor_sem){++++}, at: nilfs_transaction_begin+0x231/0xa50 fs/nilfs2/segment.c:228 #4: 00000000bcd97d87 (&dat_lock_key){.+.+}, at: nilfs_get_block+0x18f/0x970 fs/nilfs2/inode.c:79 stack backtrace: CPU: 1 PID: 25840 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/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 block_truncate_page+0x366/0xb00 fs/buffer.c:2887 nilfs_truncate+0x25d/0x4e0 fs/nilfs2/inode.c:739 nilfs_setattr+0x246/0x2a0 fs/nilfs2/inode.c:835 notify_change+0x70b/0xfc0 fs/attr.c:334 do_truncate+0x134/0x1f0 fs/open.c:63 vfs_truncate+0x54b/0x6d0 fs/open.c:109 do_sys_truncate fs/open.c:132 [inline] do_sys_truncate+0x145/0x170 fs/open.c:120 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f21bc9765a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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:00007f21bb286168 EFLAGS: 00000246 ORIG_RAX: 000000000000004c RAX: ffffffffffffffda RBX: 00007f21bca971f0 RCX: 00007f21bc9765a9 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000020000a80 RBP: 00007f21bc9d1580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe577828bf R14: 00007f21bb286300 R15: 0000000000022000 hfsplus: unable to parse mount options IPVS: ftp: loaded support on port[0] = 21 hfsplus: unable to parse mount options XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together Remounting filesystem read-only NILFS (loop1): bad btree node (ino=16, blocknr=15): level = 0, flags = 0x0, nchildren = 0 NILFS error (device loop1): nilfs_bmap_last_key: broken bmap (inode number=16) NILFS (loop1): error -5 truncating bmap (ino=16) XFS (loop2): sunit and swidth must be specified together IPVS: ftp: loaded support on port[0] = 21 XFS (loop2): sunit and swidth must be specified together base_sock_release(00000000d4dfe9d6) sk=000000001d5087fe XFS (loop2): sunit and swidth must be specified together IPVS: ftp: loaded support on port[0] = 21 base_sock_release(00000000cd86c880) sk=00000000c08aa080 base_sock_release(000000007544ea21) sk=00000000f233d333 base_sock_release(0000000015ef5467) sk=00000000d756dcaf XFS (loop2): sunit and swidth must be specified together base_sock_release(00000000021a789e) sk=00000000458c8407 base_sock_release(000000000dfe2850) sk=000000008f86d39b base_sock_release(00000000b7e19dd6) sk=000000001342750e base_sock_release(0000000030b4560a) sk=00000000f0f6cfc2 base_sock_release(0000000045bccdec) sk=0000000080aca4b1 base_sock_release(000000005068cd9a) sk=000000005217975b IPVS: ftp: loaded support on port[0] = 21 base_sock_release(000000009b97c0b3) sk=00000000f7e01f67 base_sock_release(00000000754d0904) sk=000000007d621a85 base_sock_release(000000000d27e413) sk=00000000892c9e84 base_sock_release(00000000a7e27f29) sk=000000003d21f2cf base_sock_release(000000001700e8a0) sk=00000000daf62eef base_sock_release(00000000f2a2fcb2) sk=000000001663c465 base_sock_release(000000005c59be5c) sk=0000000047f1755c base_sock_release(0000000010f6c0ca) sk=000000003700d2b1 base_sock_release(0000000035eee8d8) sk=0000000030b842f5 base_sock_release(0000000059c28929) sk=00000000e4a0c5d8 base_sock_release(00000000ec056e3a) sk=00000000d9b8fc73 base_sock_release(000000001bc1c5c2) sk=00000000594400f6 base_sock_release(00000000de6c241e) sk=00000000d370bc04 base_sock_release(00000000a4e25957) sk=0000000094def7ba base_sock_release(000000006bf1a74b) sk=00000000a51d5b7a base_sock_release(0000000044886ebb) sk=0000000006bc3c27 base_sock_release(00000000065d0138) sk=000000000d1592f1 IPVS: ftp: loaded support on port[0] = 21 base_sock_release(00000000a2c7be90) sk=00000000b2d27ca1 base_sock_release(000000007613cb73) sk=00000000cf091e31 base_sock_release(00000000ec946a88) sk=00000000fb680c88 base_sock_release(000000007af6c411) sk=000000007bd8b39d IPVS: ftp: loaded support on port[0] = 21 base_sock_release(000000000a9e8d31) sk=0000000042f4e7cd base_sock_release(00000000b012333b) sk=000000001744054d base_sock_release(00000000e287f96d) sk=00000000e577ad6a XFS (loop2): sunit and swidth must be specified together base_sock_release(000000002844f800) sk=000000002d80f414 base_sock_release(00000000e1937efe) sk=00000000abbfdf89 base_sock_release(0000000046eb1610) sk=0000000004813ed9 XFS (loop2): sunit and swidth must be specified together netlink: 40 bytes leftover after parsing attributes in process `syz-executor.3'. overlayfs: unrecognized mount option "w¼g6åo{Öc|ork$ir=./file1" or missing value netlink: 40 bytes leftover after parsing attributes in process `syz-executor.3'. 9pnet: Could not find request transport: xen XFS (loop2): sunit and swidth must be specified together netlink: 40 bytes leftover after parsing attributes in process `syz-executor.3'. XFS (loop2): sunit and swidth must be specified together overlayfs: overlapping lowerdir path overlayfs: overlapping lowerdir path 9pnet: Could not find request transport: xen 9pnet: Could not find request transport: xen overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory XFS (loop2): sunit and swidth must be specified together overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory md: invalid raid superblock magic on mtdblock0 overlayfs: 'file0' not a directory md: mtdblock0 does not have a valid v0.0 superblock, not importing! overlayfs: 'file0' not a directory md: md_import_device returned -22 overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory XFS (loop2): sunit and swidth must be specified together overlayfs: 'file0' not a directory md: invalid raid superblock magic on mtdblock0 overlayfs: 'file0' not a directory md: mtdblock0 does not have a valid v0.0 superblock, not importing! overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory md: md_import_device returned -22 overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory XFS (loop2): sunit and swidth must be specified together overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory md: invalid raid superblock magic on mtdblock0 overlayfs: 'file0' not a directory md: mtdblock0 does not have a valid v0.0 superblock, not importing! overlayfs: 'file0' not a directory md: md_import_device returned -22 overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together bridge0: port 3(batadv0) entered blocking state bridge0: port 3(batadv0) entered disabled state device batadv0 entered promiscuous mode XFS (loop2): sunit and swidth must be specified together bridge0: port 3(batadv0) entered blocking state bridge0: port 3(batadv0) entered forwarding state XFS (loop2): sunit and swidth must be specified together wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 XFS (loop2): sunit and swidth must be specified together wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 batman_adv: batadv0: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv0: No MLD Querier present - multicast optimizations disabled XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together bridge0: port 4(batadv0) entered blocking state bridge0: port 4(batadv0) entered disabled state XFS (loop2): sunit and swidth must be specified together device batadv0 entered promiscuous mode bridge0: port 4(batadv0) entered blocking state bridge0: port 4(batadv0) entered forwarding state XFS (loop2): sunit and swidth must be specified together batman_adv: batadv0: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv0: No MLD Querier present - multicast optimizations disabled XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 XFS (loop2): sunit and swidth must be specified together CPU: 0 PID: 26855 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1590 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] kmem_cache_alloc+0x277/0x370 mm/slab.c:3557 getname_flags+0xce/0x590 fs/namei.c:140 getname fs/namei.c:211 [inline] user_path_mountpoint_at+0x23/0x40 fs/namei.c:2748 ksys_umount+0x156/0x1070 fs/namespace.c:1654 __do_sys_umount fs/namespace.c:1680 [inline] __se_sys_umount fs/namespace.c:1678 [inline] __x64_sys_umount+0x50/0x70 fs/namespace.c:1678 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fc32209d5a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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:00007fc320a10168 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: ffffffffffffffda RBX: 00007fc3221bdf80 RCX: 00007fc32209d5a9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000040 RBP: 00007fc320a101d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff53873b0f R14: 00007fc320a10300 R15: 0000000000022000 XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 26929 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:3088 [inline] prepare_alloc_pages mm/page_alloc.c:4346 [inline] __alloc_pages_nodemask+0x239/0x2890 mm/page_alloc.c:4393 __alloc_pages include/linux/gfp.h:496 [inline] __alloc_pages_node include/linux/gfp.h:509 [inline] kmem_getpages mm/slab.c:1412 [inline] cache_grow_begin+0xa4/0x8a0 mm/slab.c:2682 cache_alloc_refill+0x273/0x340 mm/slab.c:3049 ____cache_alloc mm/slab.c:3132 [inline] __do_cache_alloc mm/slab.c:3354 [inline] slab_alloc mm/slab.c:3389 [inline] kmem_cache_alloc+0x346/0x370 mm/slab.c:3557 getname_flags+0xce/0x590 fs/namei.c:140 getname fs/namei.c:211 [inline] user_path_mountpoint_at+0x23/0x40 fs/namei.c:2748 ksys_umount+0x156/0x1070 fs/namespace.c:1654 __do_sys_umount fs/namespace.c:1680 [inline] __se_sys_umount fs/namespace.c:1678 [inline] __x64_sys_umount+0x50/0x70 fs/namespace.c:1678 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fc32209d5a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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:00007fc320a10168 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: ffffffffffffffda RBX: 00007fc3221bdf80 RCX: 00007fc32209d5a9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000040 RBP: 00007fc320a101d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff53873b0f R14: 00007fc320a10300 R15: 0000000000022000 XFS (loop2): sunit and swidth must be specified together XFS (loop2): sunit and swidth must be specified together