From: Jens Axboe Date: Mon, 12 Jan 2026 15:14:42 +0000 (-0700) Subject: io_uring/register: have io_parse_restrictions() set restrictions enabled X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6ed0f051d557be5a782a42f74dddbc8ed5309ec;p=thirdparty%2Fkernel%2Flinux.git io_uring/register: have io_parse_restrictions() set restrictions enabled Rather than leave this to the caller, have io_parse_restrictions() set ->registered = true if restrictions have been enabled. This is in preparation for having finer grained restrictions. Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Jens Axboe --- diff --git a/io_uring/register.c b/io_uring/register.c index 4d4e7420e7c69..f5bd57c5bc38a 100644 --- a/io_uring/register.c +++ b/io_uring/register.c @@ -150,6 +150,7 @@ static __cold int io_parse_restrictions(void __user *arg, unsigned int nr_args, } } ret = nr_args; + restrictions->registered = true; err: kfree(res); return ret; @@ -174,7 +175,6 @@ static __cold int io_register_restrictions(struct io_ring_ctx *ctx, memset(&ctx->restrictions, 0, sizeof(ctx->restrictions)); return ret; } - ctx->restrictions.registered = true; return 0; }