summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-09-02 13:28:09 -0600
committerJens Axboe <axboe@kernel.dk>2020-11-23 09:15:15 -0700
commitce59fc69b1c2da555706f6b0e77fc099f80e9d0e (patch)
tree29764ac05b873d72e3f0526c575b48f82f903e4a /fs/io_uring.c
parent418baf2c28f3473039f2f7377760bd8f6897ae18 (diff)
downloadlwn-ce59fc69b1c2da555706f6b0e77fc099f80e9d0e.tar.gz
lwn-ce59fc69b1c2da555706f6b0e77fc099f80e9d0e.zip
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 <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index a8c136a1cf4e..3cc1e59dd789 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);