From: Jens Axboe <[email protected]>
To: xingwei lee <[email protected]>
Cc: [email protected],
[email protected], [email protected],
[email protected], [email protected],
[email protected]
Subject: Re: KMSAN: uninit-value in io_rw_fail
Date: Sat, 23 Dec 2023 07:56:49 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CABOYnLzKaMLnuAffjwhsYCt3+j-KisSFpX=-EOpfz=KqGR5BAQ@mail.gmail.com>
On 12/23/23 2:07 AM, xingwei lee wrote:
> with the patch that you provided make a little change to apply to this
> commit: 5254c0cbc92d2a08e75443bdb914f1c4839cdf5a
>
> diff --git a/io_uring/rw.c b/io_uring/rw.c
> index 4943d683508b..0c856726b15d 100644
> --- a/io_uring/rw.c
> +++ b/io_uring/rw.c
> @@ -589,15 +589,19 @@ static inline int io_rw_prep_async(struct
> io_kiocb *req, int rw)
> struct iovec *iov;
> int ret;
>
> + iorw->bytes_done = 0;
> + iorw->free_iovec = NULL;
> +
> /* submission path, ->uring_lock should already be taken */
> ret = io_import_iovec(rw, req, &iov, &iorw->s, 0);
> if (unlikely(ret < 0))
> return ret;
>
> - iorw->bytes_done = 0;
> - iorw->free_iovec = iov;
> - if (iov)
> + if (iov) {
> + iorw->free_iovec = iov;
> req->flags |= REQ_F_NEED_CLEANUP;
> + }
> +
> return 0;
> }
>
> since the reproducer is in a loop
> and I ran for about 30 minutes it didn't trigger any issues.
>
> I hope it helps.
Yep, thanks for testing!
--
Jens Axboe
prev parent reply other threads:[~2023-12-23 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 10:58 KMSAN: uninit-value in io_rw_fail xingwei lee
2023-12-21 15:46 ` Jens Axboe
2023-12-23 9:07 ` xingwei lee
2023-12-23 14:56 ` Jens Axboe [this message]
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] \
[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