From: Jens Axboe <axboe@kernel.dk>
To: Mark Harmstone <maharmstone@fb.com>,
linux-btrfs@vger.kernel.org, io-uring@vger.kernel.org
Subject: Re: [PATCH v2 3/3] btrfs: don't read from userspace twice in btrfs_uring_encoded_read()
Date: Fri, 13 Dec 2024 12:50:30 -0700 [thread overview]
Message-ID: <3464006e-e1a5-48e4-b229-4c1c8609164f@kernel.dk> (raw)
In-Reply-To: <20241213184444.2112559-3-maharmstone@fb.com>
On 12/13/24 11:44 AM, Mark Harmstone wrote:
> If we return -EAGAIN the first time because we need to block,
> btrfs_uring_encoded_read() will get called twice. Take a copy of args
> the first time, to prevent userspace from messing around with it.
Looks good to me, however I think you'd want to add:
Reported-by: Jens Axboe <axboe@kernel.dk>
Fixes: 34310c442e17 ("btrfs: add io_uring command for encoded reads (ENCODED_READ ioctl)")
to the tags, but probably whoever applies this can do that.
--
Jens Axboe
next prev parent reply other threads:[~2024-12-13 20:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 18:44 [PATCH v2 1/3] io_uring/cmd: rename struct uring_cache to io_uring_cmd_data Mark Harmstone
2024-12-13 18:44 ` [PATCH v2 2/3] io_uring/cmd: add per-op data to struct io_uring_cmd_data Mark Harmstone
2024-12-13 18:44 ` [PATCH v2 3/3] btrfs: don't read from userspace twice in btrfs_uring_encoded_read() Mark Harmstone
2024-12-13 19:50 ` Jens Axboe [this message]
2024-12-13 21:18 ` Pavel Begunkov
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=3464006e-e1a5-48e4-b229-4c1c8609164f@kernel.dk \
--to=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=maharmstone@fb.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox