]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cgroup/cpuset: Fix error handling in remote_partition_disable()
authorWaiman Long <longman@redhat.com>
Sun, 30 Mar 2025 21:52:41 +0000 (17:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:15:04 +0000 (10:15 +0200)
commit9701dcbf5fce193def747ed03d6c788bcc49e2ca
tree10ffc8a3fbb47bc20b1536270c7456ee00afc0f5
parent40bc55e4fcbd740731e5f131f4fc9a94a2f86ac8
cgroup/cpuset: Fix error handling in remote_partition_disable()

[ Upstream commit 8bf450f3aec3d1bbd725d179502c64b8992588e4 ]

When remote_partition_disable() is called to disable a remote partition,
it always sets the partition to an invalid partition state. It should
only do so if an error code (prs_err) has been set. Correct that and
add proper error code in places where remote_partition_disable() is
called due to error.

Fixes: 181c8e091aae ("cgroup/cpuset: Introduce remote partition")
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/cgroup/cpuset.c