Skip to content

Commit 3306a58

Browse files
thejhaxboe
authored andcommitted
io_uring/register: fix comment about task_no_new_privs
The actual code is right, but the comment is the wrong way around. Fixes: ed82f35 ("io_uring: allow registration of per-task restrictions") Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 531bb98 commit 3306a58

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

io_uring/register.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static int io_register_restrictions_task(void __user *arg, unsigned int nr_args)
202202
return -EPERM;
203203
/*
204204
* Similar to seccomp, disallow setting a filter if task_no_new_privs
205-
* is true and we're not CAP_SYS_ADMIN.
205+
* is false and we're not CAP_SYS_ADMIN.
206206
*/
207207
if (!task_no_new_privs(current) &&
208208
!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)
238238

239239
/*
240240
* Similar to seccomp, disallow setting a filter if task_no_new_privs
241-
* is true and we're not CAP_SYS_ADMIN.
241+
* is false and we're not CAP_SYS_ADMIN.
242242
*/
243243
if (!task_no_new_privs(current) &&
244244
!ns_capable_noaudit(current_user_ns(), CAP_SYS_ADMIN))

0 commit comments

Comments
 (0)