cgroup/cpuset: Fix retval in update_cpumask()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 29 Feb 2024 10:11:14 +0000 (15:41 +0530)
committerTejun Heo <tj@kernel.org>
Thu, 29 Feb 2024 20:30:35 +0000 (10:30 -1000)
commit25125a4762835d62ba1e540c1351d447fc1f6c7c
treeb020063ef766483aef7c1e7f34acb2615f711306
parent66f40b926dd249f74334a22162c09e7ec1ec5b07
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: 99fe36ba6fc1 ("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>
kernel/cgroup/cpuset.c