From: Christoph Hellwig <hch@infradead.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Namjae Jeon <linkinjeon@kernel.org>,
hyc.lee@gmail.com, linux-fsdevel@vger.kernel.org,
Christian Brauner <brauner@kernel.org>,
"Darrick J. Wong" <djwong@kernel.org>,
linux-xfs@vger.kernel.org, Gao Xiang <xiang@kernel.org>
Subject: Re: [PATCH] ntfs: use page allocation for resident attribute inline data
Date: Wed, 22 Apr 2026 22:49:08 -0700 [thread overview]
Message-ID: <aemy1Pyl2W7JYKVl@infradead.org> (raw)
In-Reply-To: <aejFTDGOnDbQ3OJK@casper.infradead.org>
On Wed, Apr 22, 2026 at 01:55:40PM +0100, Matthew Wilcox wrote:
> On Wed, Apr 22, 2026 at 07:46:27PM +0900, Namjae Jeon wrote:
> > The current kmemdup() based allocation for IOMAP_INLINE can result in
> > inline_data pointer having a non-zero page offset. This causes
> > iomap_inline_data_valid() to fail the check:
> >
> > iomap->length <= PAGE_SIZE - offset_in_page(iomap->inline_data)
> >
> > and triggers the kernel BUG at fs/iomap/buffered-io.c:1061.
>
> Hang on, hang on, hang on.
>
> First, maybe this check is too strict. I'm sure it's true for EROFS,
> but I don't see why it should be true for everybody. Perhaps we should
> delete this check or relax it?
I think the current check should just go. ->iomap_inline_data is
treated as a normal linear address everywhere, so any offset in page
check is weird.
> Second, why are you calling kmemdup() to begin with? This seems
> entirely pointless; the iomap code is going to call memcpy() on it.
> You're supposed to just be pointing into your data structures.
Yes.
prev parent reply other threads:[~2026-04-23 5:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260422104627.8193-1-linkinjeon@kernel.org>
2026-04-22 12:55 ` [PATCH] ntfs: use page allocation for resident attribute inline data Matthew Wilcox
2026-04-22 14:35 ` Namjae Jeon
2026-04-22 15:28 ` Darrick J. Wong
2026-04-22 15:36 ` Gao Xiang
2026-04-23 5:20 ` Namjae Jeon
2026-04-23 5:49 ` Christoph Hellwig [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 \
--in-reply-to=aemy1Pyl2W7JYKVl@infradead.org \
--to=hch@infradead.org \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=hyc.lee@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=willy@infradead.org \
--cc=xiang@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