summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-03-25 10:21:35 -0600
committerJens Axboe <axboe@kernel.dk>2021-04-11 17:42:00 -0600
commit548d819d1eed7b6bf86d36c8de2fbc54b69db571 (patch)
tree8ac0386eea7f0f94709a3a6a71c981b2a4e23494
parent685fe7feedb96771683437107ba72131410e2350 (diff)
io_uring: allow SQPOLL without CAP_SYS_ADMIN or CAP_SYS_NICE
Now that we have any worker being attached to the original task as threads, accounting of CPU time is directly attributed to the original task as well. This means that we no longer have to restrict SQPOLL to needing elevated privileges, as it's really no different from just having the task spawn a busy looping thread in userspace. Reported-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--fs/io_uring.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 9a8504294ab7..852f9e908904 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -8011,10 +8011,6 @@ static int io_sq_offload_create(struct io_ring_ctx *ctx,
struct io_sq_data *sqd;
bool attached;
- ret = -EPERM;
- if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_NICE))
- goto err;
-
sqd = io_get_sq_data(p, &attached);
if (IS_ERR(sqd)) {
ret = PTR_ERR(sqd);