public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] io_uring/register: drop redundant submitter_task check
@ 2025-09-02 21:51 Caleb Sander Mateos
  2025-09-03  1:21 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Caleb Sander Mateos @ 2025-09-02 21:51 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Caleb Sander Mateos, io-uring, linux-kernel

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().

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
---
 io_uring/register.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/io_uring/register.c b/io_uring/register.c
index a1a9b2884eae..aa5f56ad8358 100644
--- a/io_uring/register.c
+++ b/io_uring/register.c
@@ -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;
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] io_uring/register: drop redundant submitter_task check
  2025-09-02 21:51 [PATCH] io_uring/register: drop redundant submitter_task check Caleb Sander Mateos
@ 2025-09-03  1:21 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2025-09-03  1:21 UTC (permalink / raw)
  To: Caleb Sander Mateos; +Cc: io-uring, linux-kernel


On Tue, 02 Sep 2025 15:51:07 -0600, Caleb Sander Mateos wrote:
> 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,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-03  1:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-02 21:51 [PATCH] io_uring/register: drop redundant submitter_task check Caleb Sander Mateos
2025-09-03  1:21 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox