All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Yifan Feng <evanfengff@gmail.com>,
	Hugh Dickins <hughd@google.com>,
	David Hildenbrand <david@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Thelen <gthelen@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tmpfs: reset the memory policy on remount with mpol=default
Date: Mon, 30 Nov 2026 16:00:38 +0800	[thread overview]
Message-ID: <a3d9347e-1bc6-4b7b-be95-d0760f9c4d77@linux.alibaba.com> (raw)
In-Reply-To: <20261127230015.30733-1-evanfengff@gmail.com>



On 11/28/26 7:00 AM, Yifan Feng wrote:
> mpol_parse_str() returns a NULL policy for "default", and
> shmem_reconfigure() takes a NULL ctx->mpol to mean that no mpol option
> was given.  So a remount with mpol=default succeeds but keeps the old
> policy:
> 
>    # mount -t tmpfs -o mpol=bind:1 none /mnt
>    # mount -o remount,mpol=default /mnt
>    # grep /mnt /proc/mounts
>    none /mnt tmpfs rw,relatime,mpol=bind:1 0 0
> 
> Record that an mpol option was parsed, and replace the policy whenever
> one was.
> 
> Fixes: 5f00110f7273 ("tmpfs: fix use-after-free of mempolicy object")
> Signed-off-by: Yifan Feng <evanfengff@gmail.com>
> ---

Good catch.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

  parent reply	other threads:[~2026-11-30  8:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 23:00 [PATCH] tmpfs: reset the memory policy on remount with mpol=default Yifan Feng
2026-11-28  0:10 ` Andrew Morton
2026-11-28 19:03   ` Yifan Feng
2026-11-28 19:33     ` Andrew Morton
2026-11-28  0:11 ` + tmpfs-reset-the-memory-policy-on-remount-with-mpol=default.patch added to mm-new branch Andrew Morton
2026-11-29  8:36   ` David Hildenbrand (Arm)
2026-11-29 21:25 ` [-] tmpfs-reset-the-memory-policy-on-remount-with-mpol=default.patch removed from -mm tree Andrew Morton
2026-11-30  8:00 ` Baolin Wang [this message]
2026-11-30 12:21 ` [PATCH] tmpfs: reset the memory policy on remount with mpol=default David Hildenbrand

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=a3d9347e-1bc6-4b7b-be95-d0760f9c4d77@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=evanfengff@gmail.com \
    --cc=gthelen@google.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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.