]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring/io-wq: do not allow pinning outside of cpuset
authorFelix Moessbauer <felix.moessbauer@siemens.com>
Tue, 10 Sep 2024 17:11:56 +0000 (19:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:00 +0000 (16:29 +0200)
commit7b3a35584db4c9690a8852356a69bea4a37e7a08
tree59843431c8f2e697018ee421386159c756d62a0c
parentc3eba0a4e940fb4a2142c06f45a161b4a39aee48
io_uring/io-wq: do not allow pinning outside of cpuset

[ Upstream commit 0997aa5497c714edbb349ca366d28bd550ba3408 ]

The io worker threads are userland threads that just never exit to the
userland. By that, they are also assigned to a cgroup (the group of the
creating task).

When changing the affinity of the io_wq thread via syscall, we must only
allow cpumasks within the limits defined by the cpuset controller of the
cgroup (if enabled).

Fixes: da64d6db3bd3 ("io_uring: One wqe per wq")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Link: https://lore.kernel.org/r/20240910171157.166423-2-felix.moessbauer@siemens.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
io_uring/io-wq.c