From: Jens Axboe <axboe@kernel.dk>
To: Jann Horn <jannh@google.com>, Pavel Begunkov <asml.silence@gmail.com>
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] io_uring/rsrc: Simplify buffer cloning by locking both rings
Date: Wed, 15 Jan 2025 13:31:11 -0700 [thread overview]
Message-ID: <a652b0a2-4ff6-487e-bc0e-2e3840a2abea@kernel.dk> (raw)
In-Reply-To: <20250115-uring-clone-refactor-v2-1-7289ba50776d@google.com>
On 1/15/25 1:26 PM, Jann Horn wrote:
> The locking in the buffer cloning code is somewhat complex because it goes
> back and forth between locking the source ring and the destination ring.
>
> Make it easier to reason about by locking both rings at the same time.
> To avoid ABBA deadlocks, lock the rings in ascending kernel address order,
> just like in lock_two_nondirectories().
I'm going to let this one sit for review for a day or two, and since it
depends changes slated for 6.13, I'll queue it up in a post-merge branch
for 6.14 if all goes well.
Thanks!
--
Jens Axboe
next prev parent reply other threads:[~2025-01-15 20:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 20:26 [PATCH v2] io_uring/rsrc: Simplify buffer cloning by locking both rings Jann Horn
2025-01-15 20:31 ` Jens Axboe [this message]
2025-01-16 14:13 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a652b0a2-4ff6-487e-bc0e-2e3840a2abea@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=io-uring@vger.kernel.org \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.