From c22f60e6e55f1bf300dd76d2222a93911f3b2bb2 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 12 Oct 2023 04:00:49 +0000 Subject: automatic import of xen --- 5eb51be6-cpupool-fix-removing-cpu-from-pool.patch | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 5eb51be6-cpupool-fix-removing-cpu-from-pool.patch (limited to '5eb51be6-cpupool-fix-removing-cpu-from-pool.patch') diff --git a/5eb51be6-cpupool-fix-removing-cpu-from-pool.patch b/5eb51be6-cpupool-fix-removing-cpu-from-pool.patch new file mode 100644 index 0000000..0ed7f48 --- /dev/null +++ b/5eb51be6-cpupool-fix-removing-cpu-from-pool.patch @@ -0,0 +1,29 @@ +# Commit 498d73647fa17d9eb7a67d2e9bdccac6b438e559 +# Date 2020-05-08 10:44:22 +0200 +# Author Juergen Gross +# Committer Jan Beulich +cpupool: fix removing cpu from a cpupool + +Commit cb563d7665f2 ("xen/sched: support core scheduling for moving +cpus to/from cpupools") introduced a regression when trying to remove +an offline cpu from a cpupool, as the system would crash in this +situation. + +Fix that by testing the cpu to be online. + +Fixes: cb563d7665f2 ("xen/sched: support core scheduling for moving cpus to/from cpupools") +Signed-off-by: Juergen Gross +Acked-by: Dario Faggioli + +--- a/xen/common/cpupool.c ++++ b/xen/common/cpupool.c +@@ -519,6 +519,9 @@ static int cpupool_unassign_cpu(struct c + debugtrace_printk("cpupool_unassign_cpu(pool=%d,cpu=%d)\n", + c->cpupool_id, cpu); + ++ if ( !cpu_online(cpu) ) ++ return -EINVAL; ++ + master_cpu = sched_get_resource_cpu(cpu); + ret = cpupool_unassign_cpu_start(c, master_cpu); + if ( ret ) -- cgit v1.2.3