|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.21] x86/cpu: identify uninitialized CPU data using BAD_APICID
commit 032d39ff0e9db7fc4eddbb9741b000005eefb8c2
Author: Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Tue May 19 13:32:48 2026 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue May 19 13:32:48 2026 +0200
x86/cpu: identify uninitialized CPU data using BAD_APICID
Uninitialized cpu_data[]Â entries have the apicid field set to BAD_APICID,
not boot_cpu_data.apicid. Fix the check in cpu_smpboot_free() to use the
correct condition.
Fixes: 7126b7f806d5 ("x86/CPU: re-work populating of cpu_data[]")
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Reviewed-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
master commit: cd0413bfacf262b258029cbccbeadf99a7fef2b4
master date: 2026-05-01 10:51:19 +0100
---
xen/arch/x86/smpboot.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 7339aeaefd..27628800a8 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -961,8 +961,7 @@ static void cpu_smpboot_free(unsigned int cpu, bool remove)
* In that case the socket number cannot be relied upon, but the respective
* socket_cpumask[] slot also wouldn't have been set.
*/
- if ( c[cpu].apicid != boot_cpu_data.apicid &&
- cpumask_empty(socket_cpumask[socket]) )
+ if ( c[cpu].apicid != BAD_APICID && cpumask_empty(socket_cpumask[socket]) )
{
xfree(socket_cpumask[socket]);
socket_cpumask[socket] = NULL;
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |