aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup
diff options
context:
space:
mode:
authorChen Ridong <chenridong@huawei.com>2025-09-19 09:49:03 +0000
committerTejun Heo <tj@kernel.org>2025-09-19 06:43:27 -1000
commit51840f7ba393dce7624a759cc4cee8c2bedf9068 (patch)
treeff6538d4bce00046de2dbf356ac720fa91a08ada /kernel/cgroup
parentcpuset: Use new excpus for nocpu error check when enabling root partition (diff)
downloadlinux-51840f7ba393dce7624a759cc4cee8c2bedf9068.tar.gz
linux-51840f7ba393dce7624a759cc4cee8c2bedf9068.zip
cpuset: fix missing error return in update_cpumask
The commit c6366739804f ("cpuset: refactor cpus_allowed_validate_change") inadvertently removed the error return when cpus_allowed_validate_change() fails. This patch restores the proper error handling by returning retval when the validation check fails. Fixes: c6366739804f ("cpuset: refactor cpus_allowed_validate_change") Signed-off-by: Chen Ridong <chenridong@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup')
-rw-r--r--kernel/cgroup/cpuset.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 44d65890326a..535174ed7126 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -2515,7 +2515,8 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
compute_trialcs_excpus(trialcs, cs);
trialcs->prs_err = PERR_NONE;
- if (cpus_allowed_validate_change(cs, trialcs, &tmp) < 0)
+ retval = cpus_allowed_validate_change(cs, trialcs, &tmp);
+ if (retval < 0)
goto out_free;
/*