From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795987548; b=FOMIYoywqDV5UecvGRKKsYdpccn7AfrcnjNgmQmbXe4Qk0qM+WsP2y218rfH69gJtTDA FEsONkwrocM24bwDA8DDVPMCi010JOlpxIaMnk1TZstV8pvwABEGlg13nnTLwNco/yCoF KZbkLt2nKOO/INGUGj26WdsIggzqdkBZ/jNGlstj8X29WGS3kIoGx7JRmLAcM4EwoFayd ExsipnP4OzSRjEhIfBJ5liffe0Qq7VMblLvWW3Uwg3YhR7viYPSNj50kAnn2gnesZ2+p3 deK6Xum20PUBKMK61/awP7wcajijB6TDUtWJ3xWnIbgrehLIWjq0xdeEdLf6KH0HyXw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795987548; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=2yO8mFHpLvc2Ep/uNDd/NkxUlwmRs5nwp3xpk7XgLtc=; b=KBMj3HCDxkRVlb5D9mGrF54ryCjlva8I5b7ljYLOrwN8tAQ3rbEs7BLOLKNbyVPUR+ui xFplcMTjulU/RnXB67wdJYz/wBFGZ1RkltyOzk70IV2tWDxTIgd9jLiWZbA4wwerEWQvB gj86fQe1rBykudfEBS7hYHcHlpOpA/gAE+mpNRqwzC2L2G+uRlYZCkcZNvL3/8SG8VRgj ecDF4o8wrvhiWOUuN+saO8h2HNWkOGqy7fOLeCTV3M+UWQAzGGKI6Kx/o5EmftPev10lj VdROfhSE+pE6oJ2UKbfhH00U/6dwMoFvaVcY1SF5c6gRXDEZ7ba3wTIwdVns2hNS2qQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=TH4ZFH0V; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C84D606A31C for ; Sun, 29 Nov 2026 21:25:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=TH4ZFH0V Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15B2C1F00897; Sun, 29 Nov 2026 21:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1795987548; bh=2yO8mFHpLvc2Ep/uNDd/NkxUlwmRs5nwp3xpk7XgLtc=; h=Date:To:From:In-Reply-To:References:Subject; b=TH4ZFH0VhbxzB8BmAIty5pxMQ8n22eyBIjdwlTcr6lnEoa7f7lOzTqGYMV9vAhDbF E1QYgU9VZpE77L4cHHyWwScJD15H8Y4HRU50v0gyWJbkgApSzSC5X1zzLeU+a8uWkd Z8tORlL6Ja9IgNGmepMQAdHl+FE/zQH+UGrf7rM0= Date: Sun, 29 Nov 2026 13:25:47 -0800 To: mm-commits@vger.kernel.org,hughd@google.com,gthelen@google.com, david@kernel.org,baolin.wang@linux.alibaba.com,evanfengff@gmail.com, akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20261127230015.30733-1-evanfengff@gmail.com> References: <20261127230015.30733-1-evanfengff@gmail.com> Subject: [-] tmpfs-reset-the-memory-policy-on-remount-with-mpol=default.patch removed from -mm tree Message-Id: <20261129212548.15B2C1F00897@smtp.kernel.org> X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list The quilt patch titled Subject: tmpfs: reset the memory policy on remount with mpol=default has been removed from the -mm tree. Its filename was tmpfs-reset-the-memory-policy-on-remount-with-mpol=default.patch This patch was dropped because David is taking it ------------------------------------------------------ From: Yifan Feng Subject: tmpfs: reset the memory policy on remount with mpol=default Date: Fri, 27 Nov 2026 15:00:15 -0800 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. Link: https://patch.msgid.link/20261127230015.30733-1-evanfengff@gmail.com Fixes: 5f00110f7273 ("tmpfs: fix use-after-free of mempolicy object") Signed-off-by: Yifan Feng Signed-off-by: Andrew Morton Cc: Hugh Dickins Cc: David Hildenbrand Cc: Baolin Wang Cc: Greg Thelen mm/shmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/mm/shmem.c~tmpfs-reset-the-memory-policy-on-remount-with-mpol=default +++ a/mm/shmem.c @@ -134,6 +134,7 @@ struct shmem_options { #define SHMEM_SEEN_HUGE 4 #define SHMEM_SEEN_INUMS 8 #define SHMEM_SEEN_QUOTA 16 +#define SHMEM_SEEN_MPOL 32 }; #ifdef CONFIG_TRANSPARENT_HUGEPAGE @@ -4905,6 +4906,7 @@ static int shmem_parse_one(struct fs_con ctx->mpol = NULL; if (mpol_parse_str(param->string, &ctx->mpol)) goto bad_value; + ctx->seen |= SHMEM_SEEN_MPOL; break; } goto unsupported_parameter; @@ -5117,7 +5119,7 @@ static int shmem_reconfigure(struct fs_c /* * Preserve previous mempolicy unless mpol remount option was specified. */ - if (ctx->mpol) { + if (ctx->seen & SHMEM_SEEN_MPOL) { mpol = sbinfo->mpol; sbinfo->mpol = ctx->mpol; /* transfers initial ref */ ctx->mpol = NULL; _ Patches currently in -mm which might be from evanfengff@gmail.com are mm-damon-core-fix-damos_walk-hang-with-zero-watermarks-interval.patch mm-damon-core-do-not-overwrite-wmarksactivated-in-damos_commit.patch tools-mm-page_owner_sort-fix-slab-allocator-labelling.patch