public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Mark Harmstone <[email protected]>,
	[email protected], [email protected]
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: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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 <[email protected]>
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


  reply	other threads:[~2024-12-13 20:19 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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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