Re: [PATCH v2 2/5] io_uring/rsrc: respect submitter_task in io_register_clone_buffers()
From: Jens Axboe
Date: Tue Sep 09 2025 - 09:39:34 EST
On 9/4/25 11:08 AM, Caleb Sander Mateos wrote:
> diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
> index 2d15b8785a95..1e5b7833076a 100644
> --- a/io_uring/rsrc.c
> +++ b/io_uring/rsrc.c
> @@ -1298,14 +1298,21 @@ int io_register_clone_buffers(struct io_ring_ctx *ctx, void __user *arg)
>
> src_ctx = file->private_data;
> if (src_ctx != ctx) {
> mutex_unlock(&ctx->uring_lock);
> lock_two_rings(ctx, src_ctx);
> +
> + if (src_ctx->submitter_task &&
> + src_ctx->submitter_task != current) {
> + ret = -EEXIST;
> + goto out;
> + }
Spurious end-of-line space detected here, pruned while merging.
--
Jens Axboe