Greeting, FYI, we noticed kernel_BUG_at_include/linux/mm.h due to commit (built with gcc-11): commit: 0af8489b0216fa1dd83e264bef8063f2632633d7 ("mm, slub: remove percpu slabs with CONFIG_SLUB_TINY") https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master [test failed on linux-next/master c76083fac3bae1a87ae3d005b5cb1cbc761e31d5] in testcase: rcutorture version: with following parameters: runtime: 300s test: default torture_type: tasks-tracing test-description: rcutorture is rcutorture kernel module load/unload test. test-url: https://www.kernel.org/doc/Documentation/RCU/torture.txt on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): If you fix the issue, kindly add following tag | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-lkp/202212312021.bc1efe86-oliver.sang@intel.com [ 25.804432][ T214] ------------[ cut here ]------------ [ 25.804917][ T214] kernel BUG at include/linux/mm.h:825! [ 25.805402][ T214] invalid opcode: 0000 [#1] SMP [ 25.805820][ T214] CPU: 0 PID: 214 Comm: udevadm Tainted: G S 6.1.0-rc2-00014-g0af8489b0216 #2 1c4d7707ec0ce574ed62a77e82a8580202758048 [ 25.806944][ T214] EIP: __dump_page.cold (include/linux/mm.h:825 mm/debug.c:97) [ 25.807376][ T214] Code: ff ff 83 05 e8 5d bb c5 01 ba 4c c4 2f c4 89 f8 83 15 ec 5d bb c5 00 e8 f2 92 ed fd 83 05 f8 5d bb c5 01 83 15 fc 5d bb c5 00 <0f> 0b 83 05 00 5e bb c5 01 b8 ac 85 a3 c4 83 15 04 5e bb c5 00 e8 All code ======== 0: ff (bad) 1: ff 83 05 e8 5d bb incl -0x44a217fb(%rbx) 7: c5 01 ba (bad) a: 4c c4 rex.WR (bad) c: 2f (bad) d: c4 (bad) e: 89 f8 mov %edi,%eax 10: 83 15 ec 5d bb c5 00 adcl $0x0,-0x3a44a214(%rip) # 0xffffffffc5bb5e03 17: e8 f2 92 ed fd callq 0xfffffffffded930e 1c: 83 05 f8 5d bb c5 01 addl $0x1,-0x3a44a208(%rip) # 0xffffffffc5bb5e1b 23: 83 15 fc 5d bb c5 00 adcl $0x0,-0x3a44a204(%rip) # 0xffffffffc5bb5e26 2a:* 0f 0b ud2 <-- trapping instruction 2c: 83 05 00 5e bb c5 01 addl $0x1,-0x3a44a200(%rip) # 0xffffffffc5bb5e33 33: b8 ac 85 a3 c4 mov $0xc4a385ac,%eax 38: 83 15 04 5e bb c5 00 adcl $0x0,-0x3a44a1fc(%rip) # 0xffffffffc5bb5e43 3f: e8 .byte 0xe8 Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: 83 05 00 5e bb c5 01 addl $0x1,-0x3a44a200(%rip) # 0xffffffffc5bb5e09 9: b8 ac 85 a3 c4 mov $0xc4a385ac,%eax e: 83 15 04 5e bb c5 00 adcl $0x0,-0x3a44a1fc(%rip) # 0xffffffffc5bb5e19 15: e8 .byte 0xe8 [ 25.808960][ T214] EAX: 00000000 EBX: e764d530 ECX: 00000003 EDX: 4108888f [ 25.809578][ T214] ESI: e764d4e0 EDI: e764d4e0 EBP: ed89db3c ESP: ed89db00 [ 25.810168][ T214] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 EFLAGS: 00210046 [ 25.810803][ T214] CR0: 80050033 CR2: 00616abc CR3: 2d878000 CR4: 000406d0 [ 25.811407][ T214] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000 [ 25.811999][ T214] DR6: fffe0ff0 DR7: 00000400 [ 25.812390][ T214] Call Trace: [ 25.812675][ T214] dump_page (mm/debug.c:131) [ 25.813025][ T214] ? _raw_spin_lock_irqsave (kernel/locking/spinlock.c:162) [ 25.813492][ T214] folio_flags+0x23/0x70 [ 25.813945][ T214] get_partial_node (include/linux/page-flags.h:483 mm/slab.h:140 mm/slub.c:2967 mm/slub.c:2225) [ 25.814357][ T214] __slab_alloc_node+0xbb/0x270 [ 25.814860][ T214] kmem_cache_alloc_lru (mm/slub.c:3404 mm/slub.c:3418 mm/slub.c:3425 mm/slub.c:3441) [ 25.815289][ T214] ? __lock_release (kernel/locking/lockdep.c:355 kernel/locking/lockdep.c:5350) [ 25.815697][ T214] ? iget_locked (fs/inode.c:1275) [ 25.816096][ T214] alloc_inode (include/linux/fs.h:3117 fs/inode.c:261) [ 25.816469][ T214] iget_locked (fs/inode.c:1286) [ 25.816829][ T214] ? lock_is_held_type (kernel/locking/lockdep.c:5409 kernel/locking/lockdep.c:5711) [ 25.817264][ T214] kernfs_get_inode (fs/kernfs/inode.c:255) [ 25.817670][ T214] kernfs_iop_lookup (fs/kernfs/dir.c:1154) [ 25.818087][ T214] __lookup_slow (fs/namei.c:1685) [ 25.818479][ T214] lookup_slow (fs/namei.c:1702) [ 25.818847][ T214] walk_component (fs/namei.c:1993) [ 25.819244][ T214] path_lookupat (fs/namei.c:2450 fs/namei.c:2474) [ 25.819627][ T214] path_openat (fs/namei.c:3684 fs/namei.c:3706) [ 25.820007][ T214] do_filp_open (fs/namei.c:3740) [ 25.820409][ T214] do_sys_openat2 (fs/open.c:1311) [ 25.820807][ T214] do_sys_open (fs/open.c:1326) [ 25.821211][ T214] __ia32_sys_openat (fs/open.c:1337) [ 25.821622][ T214] __do_fast_syscall_32 (arch/x86/entry/common.c:112 arch/x86/entry/common.c:178) [ 25.822057][ T214] ? trace_hardirqs_on (kernel/trace/trace_preemptirq.c:50 (discriminator 19)) [ 25.822480][ T214] ? __fput (fs/file_table.c:59 fs/file_table.c:333) [ 25.822842][ T214] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4262 kernel/locking/lockdep.c:4321) [ 25.823346][ T214] ? syscall_exit_to_user_mode (kernel/entry/common.c:299) [ 25.823823][ T214] ? __do_fast_syscall_32 (arch/x86/entry/common.c:183) [ 25.824259][ T214] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4262 kernel/locking/lockdep.c:4321) [ 25.824767][ T214] ? syscall_exit_to_user_mode (kernel/entry/common.c:299) [ 25.825254][ T214] ? __do_fast_syscall_32 (arch/x86/entry/common.c:183) [ 25.825696][ T214] ? __do_fast_syscall_32 (arch/x86/entry/common.c:183) [ 25.826155][ T214] ? syscall_exit_to_user_mode (kernel/entry/common.c:299) [ 25.826627][ T214] ? __do_fast_syscall_32 (arch/x86/entry/common.c:183) [ 25.827056][ T214] ? __do_fast_syscall_32 (arch/x86/entry/common.c:183) [ 25.827486][ T214] ? __do_fast_syscall_32 (arch/x86/entry/common.c:183) [ 25.827929][ T214] ? irqentry_exit_to_user_mode (kernel/entry/common.c:312) [ 25.828423][ T214] ? irqentry_exit (kernel/entry/common.c:445) [ 25.828812][ T214] do_fast_syscall_32 (arch/x86/entry/common.c:203) [ 25.829223][ T214] do_SYSENTER_32 (arch/x86/entry/common.c:247) [ 25.829589][ T214] entry_SYSENTER_32 (arch/x86/entry/entry_32.S:867) [ 25.830003][ T214] EIP: 0xb7f8c549 [ 25.830330][ T214] Code: 03 74 c0 01 10 05 03 74 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 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d 76 00 58 b8 77 00 00 00 cd 80 90 8d 76 All code ======== 0: 03 74 c0 01 add 0x1(%rax,%rax,8),%esi 4: 10 05 03 74 b8 01 adc %al,0x1b87403(%rip) # 0x1b8740d a: 10 06 adc %al,(%rsi) c: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 10: 10 07 adc %al,(%rdi) 12: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi 16: 10 08 adc %cl,(%rax) 18: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1c: 00 00 add %al,(%rax) 1e: 00 00 add %al,(%rax) 20: 00 51 52 add %dl,0x52(%rcx) 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 2a:* 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 retq 2e: 90 nop 2f: 90 nop 30: 90 nop 31: 90 nop 32: 8d 76 00 lea 0x0(%rsi),%esi 35: 58 pop %rax 36: b8 77 00 00 00 mov $0x77,%eax 3b: cd 80 int $0x80 3d: 90 nop 3e: 8d .byte 0x8d 3f: 76 .byte 0x76 Code starting with the faulting instruction =========================================== 0: 5d pop %rbp 1: 5a pop %rdx 2: 59 pop %rcx 3: c3 retq 4: 90 nop 5: 90 nop 6: 90 nop 7: 90 nop 8: 8d 76 00 lea 0x0(%rsi),%esi b: 58 pop %rax c: b8 77 00 00 00 mov $0x77,%eax 11: cd 80 int $0x80 13: 90 nop 14: 8d .byte 0x8d 15: 76 .byte 0x76 To reproduce: # build kernel cd linux cp config-6.1.0-rc2-00014-g0af8489b0216 .config make HOSTCC=gcc-11 CC=gcc-11 ARCH=i386 olddefconfig prepare modules_prepare bzImage modules make HOSTCC=gcc-11 CC=gcc-11 ARCH=i386 INSTALL_MOD_PATH= modules_install cd find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz git clone https://github.com/intel/lkp-tests.git cd lkp-tests bin/lkp qemu -k -m modules.cgz job-script # job-script is attached in this email # if come across any failure that blocks the test, # please remove ~/.lkp and /lkp dir to run from a clean state. -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests