]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
cpuset: fix missing error return in update_cpumask
authorChen Ridong <chenridong@huawei.com>
Fri, 19 Sep 2025 09:49:03 +0000 (09:49 +0000)
committerTejun Heo <tj@kernel.org>
Fri, 19 Sep 2025 16:43:27 +0000 (06:43 -1000)
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>
kernel/cgroup/cpuset.c

index 44d65890326a66603dd1b664ea7691c410c1eb29..535174ed712682f52531bd5c11ccff947c735c95 100644 (file)
@@ -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;
 
        /*