BUG: kernel NULL pointer dereference, address: 000000000000000c #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 7c4067 P4D 7c4067 PUD 62173067 PMD 0 Oops: Oops: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 2 PID: 10845 Comm: syz-executor.0 Not tainted 6.10.0-rc2-syzkaller-00269-g96e09b8f8166 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 RIP: 0010:PageTail include/linux/page-flags.h:284 [inline] RIP: 0010:const_folio_flags.constprop.0+0x0/0x50 include/linux/page-flags.h:312 Code: a1 24 8d e8 a2 24 f1 ff 90 0f 0b 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <48> 8b 47 08 a8 01 75 2a 66 90 48 89 f8 c3 cc cc cc cc f7 c7 ff 0f RSP: 0018:ffffc90002f671f8 EFLAGS: 00010246 RAX: ffffffff81e19f28 RBX: ffffe8ffad26e820 RCX: ffffffff81c2f68e RDX: 00000000ffffffff RSI: 0000000000000cc0 RDI: 0000000000000004 RBP: ffffc90002f672e0 R08: ffffe8ffad26e820 R09: 00000000000004a8 R10: ffffc90002f67300 R11: 0000000000000001 R12: ffffe8ffad26e820 R13: ffff88805a6e8c80 R14: 0000000000000004 R15: 00000000ffffffff FS: 0000000000000000(0000) GS:ffff88802c200000(0063) knlGS:00000000f5ed2b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 000000000000000c CR3: 0000000000a86000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: folio_test_active include/linux/page-flags.h:522 [inline] slab_test_pfmemalloc mm/slab.h:169 [inline] pfmemalloc_match mm/slub.c:3398 [inline] ___slab_alloc+0x3d4/0x1870 mm/slub.c:3539 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] kmem_cache_alloc_noprof+0x2ae/0x2f0 mm/slub.c:4007 mempool_init_node+0x31e/0x760 mm/mempool.c:217 mempool_init_noprof+0x3a/0x50 mm/mempool.c:246 bioset_init+0x324/0x7a0 block/bio.c:1785 bch2_fs_fs_io_direct_init+0x58/0x90 fs/bcachefs/fs-io-direct.c:681 bch2_fs_alloc+0x1abb/0x2550 fs/bcachefs/super.c:926 bch2_fs_open+0x713/0x10f0 fs/bcachefs/super.c:2102 bch2_mount+0xdc9/0x1140 fs/bcachefs/fs.c:1917 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8f/0x380 fs/super.c:1780 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x6e1/0x1f10 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __ia32_sys_mount+0x295/0x320 fs/namespace.c:3875 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf72e0579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f5ed2400 EFLAGS: 00000292 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 00000000f5ed2460 RCX: 0000000020000700 RDX: 0000000020000000 RSI: 0000000000000000 RDI: 00000000f5ed24a0 RBP: 00000000f5ed2460 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: CR2: 000000000000000c ---[ end trace 0000000000000000 ]--- RIP: 0010:PageTail include/linux/page-flags.h:284 [inline] RIP: 0010:const_folio_flags.constprop.0+0x0/0x50 include/linux/page-flags.h:312 Code: a1 24 8d e8 a2 24 f1 ff 90 0f 0b 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <48> 8b 47 08 a8 01 75 2a 66 90 48 89 f8 c3 cc cc cc cc f7 c7 ff 0f RSP: 0018:ffffc90002f671f8 EFLAGS: 00010246 RAX: ffffffff81e19f28 RBX: ffffe8ffad26e820 RCX: ffffffff81c2f68e RDX: 00000000ffffffff RSI: 0000000000000cc0 RDI: 0000000000000004 RBP: ffffc90002f672e0 R08: ffffe8ffad26e820 R09: 00000000000004a8 R10: ffffc90002f67300 R11: 0000000000000001 R12: ffffe8ffad26e820 R13: ffff88805a6e8c80 R14: 0000000000000004 R15: 00000000ffffffff FS: 0000000000000000(0000) GS:ffff88802c200000(0063) knlGS:00000000f5ed2b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 000000000000000c CR3: 0000000000a86000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: a1 24 8d e8 a2 24 f1 movabs 0x90fff124a2e88d24,%eax 7: ff 90 9: 0f 0b ud2 b: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) 12: 00 00 00 00 16: 0f 1f 40 00 nopl 0x0(%rax) 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: 90 nop 1e: 90 nop 1f: 90 nop 20: 90 nop 21: 90 nop 22: 90 nop 23: 90 nop 24: 90 nop 25: 90 nop 26: 90 nop 27: 90 nop 28: 90 nop 29: 90 nop * 2a: 48 8b 47 08 mov 0x8(%rdi),%rax <-- trapping instruction 2e: a8 01 test $0x1,%al 30: 75 2a jne 0x5c 32: 66 90 xchg %ax,%ax 34: 48 89 f8 mov %rdi,%rax 37: c3 ret 38: cc int3 39: cc int3 3a: cc int3 3b: cc int3 3c: f7 .byte 0xf7 3d: c7 (bad) 3e: ff 0f decl (%rdi)