Re: [PATCH v2 12/12] x86/mm: Enable preemption during flush_tlb_kernel_range

From: kernel test robot

Date: Tue Mar 10 2026 - 02:35:47 EST




Hello,

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

commit: 71316421085260ada767336b7d506cf68cd54501 ("[PATCH v2 12/12] x86/mm: Enable preemption during flush_tlb_kernel_range")
url: https://github.com/intel-lab-lkp/linux/commits/Chuyi-Zhou/smp-Disable-preemption-explicitly-in-__csd_lock_wait/20260302-155954
base: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git 07fff0001f755de9063652eb09f9c46a108fd7e2
patch link: https://lore.kernel.org/all/20260302075216.2170675-13-zhouchuyi@xxxxxxxxxxxxx/
patch subject: [PATCH v2 12/12] x86/mm: Enable preemption during flush_tlb_kernel_range

in testcase: boot

config: i386-randconfig-012-20250528
compiler: gcc-14
test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 4G

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



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/202603101347.ef3b298c-lkp@xxxxxxxxx



[ 0.311796][ T1] BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1
[ 0.312917][ T1] caller is debug_smp_processor_id (lib/smp_processor_id.c:59)
[ 0.313674][ T1] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Tainted: G T 7.0.0-rc1-00532-g713164210852 #1 PREEMPT(full)
[ 0.313680][ T1] Tainted: [T]=RANDSTRUCT
[ 0.313682][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 0.313684][ T1] Call Trace:
[ 0.313686][ T1] ? show_stack (arch/x86/kernel/dumpstack.c:338)
[ 0.313701][ T1] dump_stack_lvl (lib/dump_stack.c:122)
[ 0.313715][ T1] dump_stack (lib/dump_stack.c:130)
[ 0.313723][ T1] check_preemption_disabled (lib/smp_processor_id.c:47)
[ 0.313737][ T1] debug_smp_processor_id (lib/smp_processor_id.c:59)
[ 0.313743][ T1] flush_tlb_kernel_range (arch/x86/mm/tlb.c:1528)
[ 0.313764][ T1] cpa_flush (arch/x86/mm/pat/set_memory.c:455)
[ 0.313774][ T1] change_page_attr_set_clr (arch/x86/mm/pat/set_memory.c:2054)
[ 0.313802][ T1] set_memory_ro (arch/x86/mm/pat/set_memory.c:2305)
[ 0.313815][ T1] bpf_prog_select_runtime (kernel/bpf/core.c:2560 (discriminator 1))
[ 0.313829][ T1] bpf_prepare_filter (net/core/filter.c:1323 net/core/filter.c:1371)
[ 0.313847][ T1] bpf_prog_create (net/core/filter.c:1412 (discriminator 1))
[ 0.313858][ T1] ptp_classifier_init (net/core/ptp_classifier.c:227 (discriminator 2))
[ 0.313863][ T1] ? find_next_fd (include/linux/find.h:192 fs/file.c:564)
[ 0.313871][ T1] sock_init (net/socket.c:3314)
[ 0.313882][ T1] ? sock_alloc_inode (net/socket.c:347)
[ 0.313888][ T1] ? damon_sample_wsse_init (net/socket.c:3268)
[ 0.313895][ T1] do_one_initcall (init/main.c:1382)
[ 0.313904][ T1] ? parse_args (kernel/params.c:130 (discriminator 2) kernel/params.c:186 (discriminator 2))
[ 0.313923][ T1] ? debug_smp_processor_id (lib/smp_processor_id.c:59)
[ 0.313930][ T1] ? rcu_is_watching (include/linux/context_tracking.h:128 kernel/rcu/tree.c:752)
[ 0.313948][ T1] do_initcalls (init/main.c:1443 (discriminator 3) init/main.c:1460 (discriminator 3))
[ 0.313964][ T1] kernel_init_freeable (init/main.c:1694)
[ 0.313969][ T1] ? rest_init (init/main.c:1574)
[ 0.313973][ T1] kernel_init (init/main.c:1584)
[ 0.313978][ T1] ret_from_fork (arch/x86/kernel/process.c:164)
[ 0.313982][ T1] ? rest_init (init/main.c:1574)
[ 0.313989][ T1] ret_from_fork_asm (arch/x86/entry/entry_32.S:737)
[ 0.313996][ 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/20260310/202603101347.ef3b298c-lkp@xxxxxxxxx



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