NILFS (loop2): nilfs_get_block (ino=13): a race condition while inserting a data block at offset=1 ------------[ cut here ]------------ virt_to_phys used for non-linear address: 0000000026a9bd5b (0x44006b7369643d45) WARNING: CPU: 1 PID: 5005 at arch/arm64/mm/physaddr.c:15 __virt_to_phys+0x80/0x98 arch/arm64/mm/physaddr.c:17 Modules linked in: CPU: 1 PID: 5005 Comm: syz-executor.2 Not tainted 6.0.0-rc7-syzkaller-18095-gbbed346d5a96 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __virt_to_phys+0x80/0x98 arch/arm64/mm/physaddr.c:17 lr : __virt_to_phys+0x7c/0x98 arch/arm64/mm/physaddr.c:12 sp : ffff800012883600 x29: ffff800012883600 x28: 0000000000000400 x27: ffff00010bb65f18 x26: 000000000000003f x25: 0000000000000002 x24: ffff00010e644000 x23: 000000000000000d x22: ffff800008f457a4 x21: 0000000040000000 x20: 44016b7369643d45 x19: 44006b7369643d45 x18: 0000000000000313 x17: ffff80000bffd6bc x16: ffff80000db49158 x15: ffff00010bc1cf80 x14: 0000000000000000 x13: 00000000ffffffff x12: 0000000000040000 x11: 000000000000de47 x10: ffff8000183e5000 x9 : b7e8865ced9ff700 x8 : ffff80000cf00000 x7 : ffff800008161d1c x6 : 0000000000000000 x5 : 0000000000000080 x4 : 0000000000000001 x3 : 0000000000000000 x2 : ffff0001fefddcd0 x1 : 0000000100000000 x0 : 000000000000004f Call trace: __virt_to_phys+0x80/0x98 arch/arm64/mm/physaddr.c:17 virt_to_folio include/linux/mm.h:856 [inline] kfree+0x70/0x348 mm/slub.c:4561 nilfs_mdt_destroy+0x24/0x3c fs/nilfs2/mdt.c:497 nilfs_free_inode+0x2c/0x54 fs/nilfs2/super.c:168 i_callback fs/inode.c:249 [inline] alloc_inode+0xdc/0x104 fs/inode.c:274 iget5_locked+0x5c/0xc8 fs/inode.c:1242 nilfs_attach_btree_node_cache+0x98/0x128 fs/nilfs2/inode.c:666 nilfs_btree_prepare_convert_and_insert+0xb0/0x26c fs/nilfs2/btree.c:1746 nilfs_btree_convert_and_insert+0xdc/0x17c fs/nilfs2/btree.c:1878 nilfs_bmap_do_insert fs/nilfs2/bmap.c:111 [inline] nilfs_bmap_insert+0xd8/0x1d4 fs/nilfs2/bmap.c:147 nilfs_get_block+0x134/0x364 fs/nilfs2/inode.c:101 __block_write_begin_int+0x240/0x95c fs/buffer.c:2006 __block_write_begin fs/buffer.c:2056 [inline] block_write_begin+0x74/0x14c fs/buffer.c:2117 nilfs_write_begin+0x70/0xc8 fs/nilfs2/inode.c:261 generic_perform_write+0xf0/0x2cc mm/filemap.c:3738 __generic_file_write_iter+0xd8/0x21c mm/filemap.c:3866 generic_file_write_iter+0x6c/0x168 mm/filemap.c:3898 do_iter_write+0x318/0x560 fs/read_write.c:855 vfs_writev fs/read_write.c:928 [inline] do_writev+0x12c/0x234 fs/read_write.c:971 __do_sys_writev fs/read_write.c:1044 [inline] __se_sys_writev fs/read_write.c:1041 [inline] __arm64_sys_writev+0x28/0x38 fs/read_write.c:1041 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall arch/arm64/kernel/syscall.c:52 [inline] el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:636 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 irq event stamp: 4154 hardirqs last enabled at (4153): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1367 [inline] hardirqs last enabled at (4153): [] finish_lock_switch+0x94/0xe8 kernel/sched/core.c:4942 hardirqs last disabled at (4154): [] el1_dbg+0x24/0x5c arch/arm64/kernel/entry-common.c:404 softirqs last enabled at (3980): [] _stext+0x2e4/0x37c softirqs last disabled at (3895): [] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:79 ---[ end trace 0000000000000000 ]--- Unable to handle kernel paging request at virtual address 000fffadd38710c8 Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 [000fffadd38710c8] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 5005 Comm: syz-executor.2 Tainted: G W 6.0.0-rc7-syzkaller-18095-gbbed346d5a96 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : _compound_head include/linux/page-flags.h:253 [inline] pc : virt_to_folio include/linux/mm.h:858 [inline] pc : kfree+0x80/0x348 mm/slub.c:4561 lr : virt_to_folio include/linux/mm.h:856 [inline] lr : kfree+0x70/0x348 mm/slub.c:4561 sp : ffff800012883620 x29: ffff800012883630 x28: 0000000000000400 x27: ffff00010bb65f18 x26: 000000000000003f x25: 0000000000000002 x24: ffff00010e644000 x23: 000000000000000d x22: ffff800008f457a4 x21: 010fffadd38710c0 x20: ffff800008f55d20 x19: 44006b7369643d45 x18: 0000000000000313 x17: ffff80000bffd6bc x16: ffff80000db49158 x15: ffff00010bc1cf80 x14: 0000000000000000 x13: 00000000ffffffff x12: 0000000000040000 x11: 000000000000de47 x10: ffff8000183e5000 x9 : fffffc0000000000 x8 : 0004400eb74e1c43 x7 : ffff800008161d1c x6 : 0000000000000000 x5 : 0000000000000080 x4 : 0000000000000001 x3 : 0000000000000000 x2 : ffff0001fefddcd0 x1 : 0000000100000000 x0 : 4400eb7521c43d45 Call trace: virt_to_folio include/linux/mm.h:856 [inline] kfree+0x80/0x348 mm/slub.c:4561 nilfs_mdt_destroy+0x24/0x3c fs/nilfs2/mdt.c:497 nilfs_free_inode+0x2c/0x54 fs/nilfs2/super.c:168 i_callback fs/inode.c:249 [inline] alloc_inode+0xdc/0x104 fs/inode.c:274 iget5_locked+0x5c/0xc8 fs/inode.c:1242 nilfs_attach_btree_node_cache+0x98/0x128 fs/nilfs2/inode.c:666 nilfs_btree_prepare_convert_and_insert+0xb0/0x26c fs/nilfs2/btree.c:1746 nilfs_btree_convert_and_insert+0xdc/0x17c fs/nilfs2/btree.c:1878 nilfs_bmap_do_insert fs/nilfs2/bmap.c:111 [inline] nilfs_bmap_insert+0xd8/0x1d4 fs/nilfs2/bmap.c:147 nilfs_get_block+0x134/0x364 fs/nilfs2/inode.c:101 __block_write_begin_int+0x240/0x95c fs/buffer.c:2006 __block_write_begin fs/buffer.c:2056 [inline] block_write_begin+0x74/0x14c fs/buffer.c:2117 nilfs_write_begin+0x70/0xc8 fs/nilfs2/inode.c:261 generic_perform_write+0xf0/0x2cc mm/filemap.c:3738 __generic_file_write_iter+0xd8/0x21c mm/filemap.c:3866 generic_file_write_iter+0x6c/0x168 mm/filemap.c:3898 do_iter_write+0x318/0x560 fs/read_write.c:855 vfs_writev fs/read_write.c:928 [inline] do_writev+0x12c/0x234 fs/read_write.c:971 __do_sys_writev fs/read_write.c:1044 [inline] __se_sys_writev fs/read_write.c:1041 [inline] __arm64_sys_writev+0x28/0x38 fs/read_write.c:1041 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall arch/arm64/kernel/syscall.c:52 [inline] el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:636 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 Code: d34cfc08 cb953108 b25657e9 8b081935 (f94006a8) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: d34cfc08 lsr x8, x0, #12 4: cb953108 sub x8, x8, x21, asr #12 8: b25657e9 mov x9, #0xfffffc0000000000 // #-4398046511104 c: 8b081935 add x21, x9, x8, lsl #6 * 10: f94006a8 ldr x8, [x21, #8] <-- trapping instruction