]> xenbits.xensource.com Git - xen.git/commit
xen/sched: fix adding offline cpu to cpupool
authorJuergen Gross <jgross@suse.com>
Wed, 6 Dec 2023 09:49:29 +0000 (10:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 6 Dec 2023 09:49:29 +0000 (10:49 +0100)
commit5d01aa7ad5ee7d6da1e4d519d716f3256fcc36a5
tree9163948785a3c95d0cb3d8165c98899c44b143a7
parent7d8bd64e11081d075af7700a844096f6eeb70446
xen/sched: fix adding offline cpu to cpupool

Trying to add an offline cpu to a cpupool can crash the hypervisor,
as the probably non-existing percpu area of the cpu is accessed before
the availability of the cpu is being tested. This can happen in case
the cpupool's granularity is "core" or "socket".

Fix that by testing the cpu to be online.

Fixes: cb563d7665f2 ("xen/sched: support core scheduling for moving cpus to/from cpupools")
Reported-by: René Winther Højgaard <renewin@proton.me>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 06e8d65d33896aa90f5b6d9b2bce7f11433b33c9
master date: 2023-12-05 09:57:38 +0100
xen/common/sched/cpupool.c