[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4a2fb88a-6f04-48d6-be9a-b1888abc0ad8@kernel.dk>
Date: Sat, 23 Dec 2023 07:56:49 -0700
From: Jens Axboe <axboe@...nel.dk>
To: xingwei lee <xrivendell7@...il.com>
Cc: syzbot+12dde80bf174ac8ae285@...kaller.appspotmail.com,
asml.silence@...il.com, io-uring@...r.kernel.org,
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com,
glider@...gle.com
Subject: Re: KMSAN: uninit-value in io_rw_fail
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
Powered by blists - more mailing lists