All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: 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 13:55:40 +0100	[thread overview]
Message-ID: <aejFTDGOnDbQ3OJK@casper.infradead.org> (raw)
In-Reply-To: <20260422104627.8193-1-linkinjeon@kernel.org>

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?

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.

  reply	other threads:[~2026-04-22 12:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22 10:46 [PATCH] ntfs: use page allocation for resident attribute inline data Namjae Jeon
2026-04-22 12:55 ` Matthew Wilcox [this message]
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

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=aejFTDGOnDbQ3OJK@casper.infradead.org \
    --to=willy@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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.