Skip to content

Commit 25125a4

Browse files
kamalesh-babulalhtejun
authored andcommitted
cgroup/cpuset: Fix retval in update_cpumask()
The update_cpumask(), checks for newly requested cpumask by calling validate_change(), which returns an error on passing an invalid set of cpu(s). Independent of the error returned, update_cpumask() always returns zero, suppressing the error and returning success to the user on writing an invalid cpu range for a cpuset. Fix it by returning retval instead, which is returned by validate_change(). Fixes: 99fe36b ("cgroup/cpuset: Improve temporary cpumasks handling") Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com> Reviewed-by: Waiman Long <longman@redhat.com> Cc: stable@vger.kernel.org # v6.6+ Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent 66f40b9 commit 25125a4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/cgroup/cpuset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2562,7 +2562,7 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
25622562
update_partition_sd_lb(cs, old_prs);
25632563
out_free:
25642564
free_cpumasks(NULL, &tmp);
2565-
return 0;
2565+
return retval;
25662566
}
25672567

25682568
/**

0 commit comments

Comments
 (0)