summaryrefslogtreecommitdiff
path: root/io_uring/register.c
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2026-03-09 15:34:41 +0100
committerJens Axboe <axboe@kernel.dk>2026-03-09 08:40:18 -0600
commit3306a589e598b50a5bbdfe837371670b507043c0 (patch)
treea8aed69472e3d5c663ae9a2b04b190c229a6bfcb /io_uring/register.c
parent531bb98a030cc1073bd7ed9a502c0a3a781e92ee (diff)
io_uring/register: fix comment about task_no_new_privs
The actual code is right, but the comment is the wrong way around. Fixes: ed82f35b926b ("io_uring: allow registration of per-task restrictions") Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/register.c')
-rw-r--r--io_uring/register.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/register.c b/io_uring/register.c
index 594b1f2ce875..a839b22fd392 100644
--- a/io_uring/register.c
+++ b/io_uring/register.c
@@ -202,7 +202,7 @@ static int io_register_restrictions_task(void __user *arg, unsigned int nr_args)
return -EPERM;
/*
* Similar to seccomp, disallow setting a filter if task_no_new_privs
- * is true and we're not CAP_SYS_ADMIN.
+ * is false and we're not CAP_SYS_ADMIN.
*/
if (!task_no_new_privs(current) &&
!ns_capable_noaudit(current_user_ns(), CAP_SYS_ADMIN))
@@ -238,7 +238,7 @@ static int io_register_bpf_filter_task(void __user *arg, unsigned int nr_args)
/*
* Similar to seccomp, disallow setting a filter if task_no_new_privs
- * is true and we're not CAP_SYS_ADMIN.
+ * is false and we're not CAP_SYS_ADMIN.
*/
if (!task_no_new_privs(current) &&
!ns_capable_noaudit(current_user_ns(), CAP_SYS_ADMIN))