Re: [PATCH tip 2/3] sched: make migrate_enable/migrate_disable inline

From: kernel test robot
Date: Mon Aug 11 2025 - 22:51:51 EST




Hello,

kernel test robot noticed "BUG:using_smp_processor_id()in_preemptible" on:

commit: 10f0da02e16093e603e5f82fe735f836a3791ca0 ("[PATCH tip 2/3] sched: make migrate_enable/migrate_disable inline")
url: https://github.com/intel-lab-lkp/linux/commits/Menglong-Dong/arch-add-the-macro-COMPILE_OFFSETS-to-all-the-asm-offsets-c/20250810-110846
base: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git b2fc521b40b9e94f6fe2cc9820b14ae67d8fe891
patch link: https://lore.kernel.org/all/20250810030442.246974-3-dongml2@xxxxxxxxxxxxxxx/
patch subject: [PATCH tip 2/3] sched: make migrate_enable/migrate_disable inline

in testcase: boot

config: i386-randconfig-007-20250811
compiler: gcc-12
test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 4G

(please refer to attached dmesg/kmsg for entire log/backtrace)


+--------------------------------------------+------------+------------+
| | 51b2cbc934 | 10f0da02e1 |
+--------------------------------------------+------------+------------+
| BUG:using_smp_processor_id()in_preemptible | 0 | 6 |
+--------------------------------------------+------------+------------+


If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-lkp/202508120411.6173c4f-lkp@xxxxxxxxx


[ 25.544225][ T1] BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1
[ 25.643781][ T1] caller is debug_smp_processor_id (lib/smp_processor_id.c:59)
[ 25.657229][ T1] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.16.0-12127-g10f0da02e160 #1 PREEMPTLAZY
[ 25.658066][ T1] Call Trace:
[ 25.658066][ T1] dump_stack_lvl (lib/dump_stack.c:123)
[ 25.658066][ T1] dump_stack (lib/dump_stack.c:130)
[ 25.658066][ T1] check_preemption_disabled (arch/x86/include/asm/preempt.h:85 lib/smp_processor_id.c:51)
[ 25.658066][ T1] debug_smp_processor_id (lib/smp_processor_id.c:59)
[ 25.658066][ T1] __kvm_is_vmx_supported (arch/x86/include/asm/cpuid/api.h:29 arch/x86/include/asm/cpuid/api.h:74 arch/x86/include/asm/cpuid/api.h:113 arch/x86/kvm/vmx/vmx.c:2743)
[ 25.658066][ T1] vmx_init (arch/x86/kvm/vmx/vmx.c:8557)
[ 25.658066][ T1] ? pi_init_cpu (arch/x86/kvm/vmx/main.c:1028)
[ 25.658066][ T1] vt_init (arch/x86/kvm/vmx/main.c:1033)
[ 25.658066][ T1] do_one_initcall (init/main.c:1269)
[ 25.658066][ T1] do_initcalls (init/main.c:1330 init/main.c:1347)
[ 25.658066][ T1] kernel_init_freeable (init/main.c:1583)
[ 25.658066][ T1] ? rest_init (init/main.c:1461)
[ 25.658066][ T1] kernel_init (init/main.c:1471)
[ 25.658066][ T1] ret_from_fork (arch/x86/kernel/process.c:154)
[ 25.658066][ T1] ? rest_init (init/main.c:1461)
[ 25.658066][ T1] ret_from_fork_asm (arch/x86/entry/entry_32.S:737)
[ 25.658066][ T1] entry_INT80_32 (arch/x86/entry/entry_32.S:945)
[ 25.815107][ T1] kvm_intel: VMX not supported by CPU 0
[ 25.822075][ T1] BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1
[ 25.833038][ T1] caller is debug_smp_processor_id (lib/smp_processor_id.c:59)
[ 25.842786][ T1] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.16.0-12127-g10f0da02e160 #1 PREEMPTLAZY
[ 25.843623][ T1] Call Trace:
[ 25.843623][ T1] dump_stack_lvl (lib/dump_stack.c:123)
[ 25.843623][ T1] dump_stack (lib/dump_stack.c:130)
[ 25.843623][ T1] check_preemption_disabled (arch/x86/include/asm/preempt.h:85 lib/smp_processor_id.c:51)
[ 25.843623][ T1] ? vt_init (arch/x86/kvm/svm/svm.c:5494)
[ 25.843623][ T1] debug_smp_processor_id (lib/smp_processor_id.c:59)
[ 25.843623][ T1] __kvm_is_svm_supported (arch/x86/kvm/svm/svm.c:429)
[ 25.843623][ T1] svm_init (arch/x86/kvm/svm/svm.c:456 arch/x86/kvm/svm/svm.c:5501)
[ 25.843623][ T1] do_one_initcall (init/main.c:1269)
[ 25.843623][ T1] do_initcalls (init/main.c:1330 init/main.c:1347)
[ 25.843623][ T1] kernel_init_freeable (init/main.c:1583)
[ 25.843623][ T1] ? rest_init (init/main.c:1461)
[ 25.843623][ T1] kernel_init (init/main.c:1471)
[ 25.843623][ T1] ret_from_fork (arch/x86/kernel/process.c:154)
[ 25.843623][ T1] ? rest_init (init/main.c:1461)
[ 25.843623][ T1] ret_from_fork_asm (arch/x86/entry/entry_32.S:737)
[ 25.843623][ T1] entry_INT80_32 (arch/x86/entry/entry_32.S:945)


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20250812/202508120411.6173c4f-lkp@xxxxxxxxx



--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki