From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.133 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796025651; b=MBS5Jw9FKf0Ib18Ov4BT5OcZBwmY5I57z5JXqmVEvfnkJEu+rwVHuZeD+1kfvE6APesb rrbjhKleJKecL27Y7ivFjhbQbBLQiekD7OjuHvGLHztLhOUV3GdGu2JetSSosfINYBHSJ SzjI8aJL/CeEYzG7ZPqZtFU9L6PP28uO0SKtAGVWw0iYHsimellJoRbV14ye4WjtZ7XSh v4Ic3cSP/6gxGtMyAbPXU7dSylH6TLRrJL8jMg/+EWFM9yIqE5IapzO7WVPW5xde76W90 Gi+7JIf4XT7YKJAPRB3fUIjm/lfbd3kq7ot+U6Zj9pDvH/KI9iEn3tNDG7vLvtXuE3A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796025651; h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=YQvt+Th0J/6ThMhc7taSQud7y2dsxJbYpDlDW5VVURQ=; b=GTxBhyEKudpEjVWhvsQDe0lc6XrJtc6ZiBObadYtv31FY4P0++g7Es7s6VyT5GH4q6BR LoaWQo/zJDuwJ7+tnAc3G5T/LqmBoGOZzMYpn5UglJzlsdVSeNCwChJI0OtDl/iqL7o78 AuWT870lpB5wDWQ7ebMDtyQ6CMVJ6OeR+Cz1LMwBFtyjmie2OH8GfUE9Aq1ZGOFEFxoWd wCFKXFLkqxas647H7DCDQeYHf+hAx0CEXF3d8oLwFUnWxmI8IXVsjr0ckiJRUXmvAmL+x zuw0plwDIiTXT8mksN6jxXAY959ve258cF6QH0WsIFXxnZbOohvg9+upQaPvnlQrL0w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=vYklhZ04; arc=none smtp.remote-ip=115.124.30.133 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6D38606A320 for ; Mon, 30 Nov 2026 08:00:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E6D38606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=vYklhZ04 DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1796025640; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=YQvt+Th0J/6ThMhc7taSQud7y2dsxJbYpDlDW5VVURQ=; b=vYklhZ04vf5WRPRLApa96AFbOtS8XGdRhj1nytzjtyf8u0AMzS/yuz2VaSr8AegytV6fmst0GuTpFVtGYDw8PQzCg8DCznD1Y4f1maM4WjQl8qQGegsWEGo1T4TfBl9LFJxYbpO7oTWtguZjQBV6KUkxQ+olQjRA8V8GSYm9tBw= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037009110;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0XFhK.Q6_1796025638; Received: from 30.74.144.138(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0XFhK.Q6_1796025638 cluster:ay36) by smtp.aliyun-inc.com; Mon, 30 Nov 2026 16:00:40 +0800 Message-ID: Date: Mon, 30 Nov 2026 16:00:38 +0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] tmpfs: reset the memory policy on remount with mpol=default To: Yifan Feng , Hugh Dickins , David Hildenbrand , Andrew Morton Cc: Greg Thelen , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20261127230015.30733-1-evanfengff@gmail.com> From: Baolin Wang In-Reply-To: <20261127230015.30733-1-evanfengff@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 > --- Good catch. Reviewed-by: Baolin Wang