mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Yifan Feng <evanfengff@gmail.com>,
	Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>,
	Gregory Price <gourry@gourry.net>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tmpfs: escape the space in the mpol mount option
Date: Wed, 2 Dec 2026 14:40:56 +0100	[thread overview]
Message-ID: <b1f1a57f-291c-4543-908e-20f055c60795@kernel.org> (raw)
In-Reply-To: <20261202001843.71256-1-evanfengff@gmail.com>

On 12/2/26 01:18, Yifan Feng wrote:
> The policy names "weighted interleave" and "prefer (many)" contain a
> space, and shmem_show_mpol() prints the name as it is.  Readers of
> /proc/mounts take the space as the end of the options field, so
> mount(8) reads back mpol=prefer and an unrelated remount replaces the
> policy:
> 
>   # mount -t tmpfs -o 'mpol=prefer (many):0-1' none /mnt
>   # grep /mnt /proc/mounts
>   none /mnt tmpfs rw,relatime,inode64,mpol=prefer (many):0-1 0 0
>   # mount -o remount,size=128M /mnt
>   # grep /mnt /proc/mounts
>   none /mnt tmpfs rw,relatime,size=131072k,inode64,mpol=local 0 0
> 
> With "weighted interleave" the same remount fails with EINVAL.
> 
> Escape the value like the other fields of the line, so that the space
> is printed as \040.  The mount above is then shown as
> 
>   none /mnt tmpfs rw,relatime,inode64,mpol=prefer\040(many):0-1 0 0
> 
> and keeps its policy over the remount.
> 
> Fixes: b27abaccf8e8 ("mm/mempolicy: add MPOL_PREFERRED_MANY for multiple preferred nodes")
> Signed-off-by: Yifan Feng <evanfengff@gmail.com>
> ---

I guess that's ok, it changes something that was already user-visible ... . I'll
queue it but wait for more review.

-- 
Cheers,

David

      reply	other threads:[~2026-12-02 13:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  0:18 Yifan Feng
2026-12-02 13:40 ` David Hildenbrand (Arm) [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=b1f1a57f-291c-4543-908e-20f055c60795@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=evanfengff@gmail.com \
    --cc=gourry@gourry.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®