linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Brian Foster <bfoster@redhat.com>, Barry Song <21cnbao@gmail.com>,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, Hugh Dickins <hughd@google.com>,
	syzbot+178fff6149127421c2cc@syzkaller.appspotmail.com
Subject: Re: [PATCH] mm/shmem: fix uninitialized folio in shmem_symlink
Date: Tue, 6 Jan 2026 18:46:07 +0000	[thread overview]
Message-ID: <aV1Yb4r9_ukWoc8i@casper.infradead.org> (raw)
In-Reply-To: <2b12f63b-ceab-4d3e-a06f-f41e6b1b2d23@linux.alibaba.com>

On Tue, Jan 06, 2026 at 11:47:44AM +0800, Baolin Wang wrote:
> Why I prefer Barry's fix: First, the symlink folio is marked Uptodate after
> copying the symlink name, but the whole folio hasn’t been initialized, which
> seems unreasonable to me. Second, as I said before, using the 'PG_owner_2'
> flag to mark this uncommon case doesn’t seem worthwhile. Currently, IIUC the
> 'PG_owner_2' is only used by btrfs; if we ever want to remove the
> 'PG_owner_2', this uncommon symlink case shouldn’t block its removal.

PG_owner_2 is aliased with PG_mappedtodisk [1], so it's used by every
filesystem which uses buffer_heads (whether mentioned in that filesystem
or not).  btrfs was switched from using private_2 to using owner_2
a little over a year ago.  PG_owner_2 is not on the list of flags to be
removed; that's PG_private, PG_private_2 and PG_reserved.

[1] include/linux/page-flags.h:     PG_mappedtodisk = PG_owner_2,


  parent reply	other threads:[~2026-01-06 18:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-24  9:40 Barry Song
2025-12-24 17:01 ` Matthew Wilcox
2025-12-25  4:04   ` Barry Song
2025-12-25 10:08     ` Baolin Wang
2026-01-05 13:58       ` Brian Foster
2026-01-05 17:50         ` Matthew Wilcox
2026-01-06  3:47         ` Baolin Wang
2026-01-06 15:56           ` Brian Foster
2026-01-07  1:12             ` Baolin Wang
2026-01-06 18:46           ` Matthew Wilcox [this message]
2026-01-07  1:16             ` Baolin Wang
2025-12-28  4:29     ` Matthew Wilcox
2026-01-05  8:54 ` Baolin Wang

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=aV1Yb4r9_ukWoc8i@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=bfoster@redhat.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=syzbot+178fff6149127421c2cc@syzkaller.appspotmail.com \
    /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