linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, Pavel Begunkov <asml.silence@gmail.com>
Cc: io-uring@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: io-uring: KASAN failure, presumably REQ_F_REISSUE issue
Date: Sat, 11 Sep 2021 21:43:18 -0700	[thread overview]
Message-ID: <825AB372-93CE-43C0-8947-EAB819547494@gmail.com> (raw)
In-Reply-To: <2C3AECED-1915-4080-B143-5BA4D76FB5CD@gmail.com>



> On Sep 11, 2021, at 7:34 PM, Nadav Amit <nadav.amit@gmail.com> wrote:
> 
> Hello Jens (& Pavel),
> 
> I hope you are having a nice weekend. I ran into a KASAN failure in io-uring
> which I think is not "my fault".

Small correction of myself (beside the subject):
> 
> I believe the issue is related to the handling of REQ_F_REISSUE and
> specifically to commit 230d50d448acb ("io_uring: move reissue into regular IO
> path"). There seems to be a race between io_write()/io_read()
> and __io_complete_rw()/kiocb_done().
> 
> __io_complete_rw() sets REQ_F_REIUSSE:
> 
>               if ((res == -EAGAIN || res == -EOPNOTSUPP) &&
>                    io_rw_should_reissue(req)) {
>                        req->flags |= REQ_F_REISSUE;
>                        return;
>               }

The race only appears to be with __io_complete_rw(), not kiocb_done().


  reply	other threads:[~2021-09-12  4:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-12  2:34 io-uring: KASAN failure, presumably Nadav Amit
2021-09-12  4:43 ` Nadav Amit [this message]
2021-09-12 13:00 ` Jens Axboe
2021-09-12 18:15 ` Jens Axboe
2021-09-12 18:21   ` Nadav Amit
2021-09-12 18:24     ` 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 \
    --in-reply-to=825AB372-93CE-43C0-8947-EAB819547494@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).