Skip to contentSkip to conversation

io_uring/register: drop redundant submitter_task check

PATCH Applied Caleb Sander Mateos 2 participants 2 messages Sep 2, 2025 – Sep 3, 2025 io_uring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 io_uring/register: drop redundant submitter_task check

For IORING_SETUP_SINGLE_ISSUER io_ring_ctx's, io_register_resize_rings() checks that the current task is the ctx's submitter_task. However, its caller __io_uring_register() already checks this. Drop the redundant check in io_register_resize_rings().

---
 io_uring/register.c | 4 ----
 1 file changed, 4 deletions(-)
io_uring/register.c +0 -4
index a1a9b2884eae..aa5f56ad8358 100644
@@ -406,14 +406,10 @@ static int io_register_resize_rings(struct io_ring_ctx *ctx, void __user *arg)
 	size_t size, sq_array_offset;
 	unsigned i, tail, old_head;
 	struct io_uring_params p;
 	int ret;
 
-	/* for single issuer, must be owner resizing */
-	if (ctx->flags & IORING_SETUP_SINGLE_ISSUER &&
-	    current != ctx->submitter_task)
-		return -EEXIST;
 	/* limited to DEFER_TASKRUN for now */
 	if (!(ctx->flags & IORING_SETUP_DEFER_TASKRUN))
 		return -EINVAL;
 	if (copy_from_user(&p, arg, sizeof(p)))
 		return -EFAULT;
Signature · 1 line
2.45.2
maintainer Applied
#1 lore raw
Quoted 6 lines · Caleb Sander Mateos

For IORING_SETUP_SINGLE_ISSUER io_ring_ctx's, io_register_resize_rings() checks that the current task is the ctx's submitter_task. However, its caller __io_uring_register() already checks this. Drop the redundant check in io_register_resize_rings().

Applied, thanks!

[1/1] io_uring/register: drop redundant submitter_task check

      commit: 8b9c9a2e7da11e50a1109a1f38bca0aecf25b185

Best regards,

Signature · 1 line
Jens Axboe