public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jeff Moyer <[email protected]>
To: Pavel Begunkov <[email protected]>
Cc: Jens Axboe <[email protected]>,
	[email protected], [email protected],
	David Howells <[email protected]>
Subject: Re: [PATCH 5.10] io_uring: fix ITER_BVEC check
Date: Tue, 24 Nov 2020 09:45:06 -0500	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <26e5446cb6252589a7edc4c3bbe4d8a503919bd8.1606172908.git.asml.silence@gmail.com> (Pavel Begunkov's message of "Mon, 23 Nov 2020 23:20:27 +0000")

Pavel Begunkov <[email protected]> writes:

> iov_iter::type is a bitmask that also keeps direction etc., so it
> shouldn't be directly compared against ITER_*. Use proper helper.
>
> Cc: <[email protected]> # 5.9
> Reported-by: David Howells <[email protected]>
> Signed-off-by: Pavel Begunkov <[email protected]>

Fixes: ff6165b2d7f6 ("io_uring: retain iov_iter state over io_read/io_write calls")

> ---
>  fs/io_uring.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index 593dfef32b17..7c1f255807f5 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -3278,7 +3278,7 @@ static void io_req_map_rw(struct io_kiocb *req, const struct iovec *iovec,
>  	rw->free_iovec = iovec;
>  	rw->bytes_done = 0;
>  	/* can only be fixed buffers, no need to do anything */
> -	if (iter->type == ITER_BVEC)
> +	if (iov_iter_is_bvec(iter))
>  		return;
>  	if (!iovec) {
>  		unsigned iov_off = 0;


  reply	other threads:[~2020-11-24 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 23:20 [PATCH 5.10] io_uring: fix ITER_BVEC check Pavel Begunkov
2020-11-24 14:45 ` Jeff Moyer [this message]
2020-11-24 14:53 ` 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 \
    [email protected] \
    [email protected] \
    [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