From ce59fc69b1c2da555706f6b0e77fc099f80e9d0e Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 2 Sep 2020 13:28:09 -0600 Subject: [PATCH] io_uring: allow SQPOLL with CAP_SYS_NICE privileges CAP_SYS_ADMIN is too restrictive for a lot of uses cases, allow CAP_SYS_NICE based on the premise that such users are already allowed to raise the priority of tasks. Signed-off-by: Jens Axboe --- fs/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index a8c136a1cf4e6..3cc1e59dd789c 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -7783,7 +7783,7 @@ static int io_sq_offload_create(struct io_ring_ctx *ctx, struct io_sq_data *sqd; ret = -EPERM; - if (!capable(CAP_SYS_ADMIN)) + if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_NICE)) goto err; sqd = io_get_sq_data(p); -- 2.30.2