From: Matthew Wilcox <willy@infradead.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Joanne Koong <joannelkoong@gmail.com>,
brauner@kernel.org, djwong@kernel.org, bfoster@redhat.com,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v4 1/1] iomap: fix invalid folio access after folio_end_read()
Date: Mon, 26 Jan 2026 14:55:31 +0000 [thread overview]
Message-ID: <aXeAY8K12KKf9d4_@casper.infradead.org> (raw)
In-Reply-To: <aXb_trkyt-uzdIkd@infradead.org>
On Sun, Jan 25, 2026 at 09:46:30PM -0800, Christoph Hellwig wrote:
> > - if (ctx->ops->submit_read)
> > - ctx->ops->submit_read(ctx);
> > -
> > - iomap_read_end(folio, bytes_submitted);
> > + iomap_read_submit_and_end(ctx, bytes_submitted);
>
> Can you drop this cleanup for now? I think it's actually useful,
> but it should be in a separate patch, and creates a conflict with
> my iomap PI series.
>
> The actual fix looks great and simplified the code nicely!
I don't think it's just a cleanup -- I think it's a bug fix. But, yes,
it should be a separate patch because it's a separate bug. That bug
can be hit if the folio passed to iomap_read_folio() covers more than
one extent, the first call to iomap_iter() succeeds, and then the second
one fails. Now we have a folio with a positive read_pending that will
never become zero, so we'll never unlock the folio.
Not sure how we'd write an fstest that would exercise this ...
next prev parent reply other threads:[~2026-01-26 14:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 23:56 [PATCH v4 0/1] iomap: fix invalid folio access after folio_end_read() Joanne Koong
2026-01-23 23:56 ` [PATCH v4 1/1] " Joanne Koong
2026-01-26 5:46 ` Christoph Hellwig
2026-01-26 14:55 ` Matthew Wilcox [this message]
2026-01-26 14:59 ` Christoph Hellwig
2026-01-26 21:36 ` Joanne Koong
2026-01-26 21:42 ` Matthew Wilcox
2026-01-26 22:10 ` Joanne Koong
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=aXeAY8K12KKf9d4_@casper.infradead.org \
--to=willy@infradead.org \
--cc=bfoster@redhat.com \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=joannelkoong@gmail.com \
--cc=linux-fsdevel@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