Message ID | 20241210213744.2968-2-gourry@gourry.net (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AB8CE7717F for <linux-mm@archiver.kernel.org>; Tue, 10 Dec 2024 21:38:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 213368D000B; Tue, 10 Dec 2024 16:38:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 199A68D0013; Tue, 10 Dec 2024 16:38:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F2CDA8D000B; Tue, 10 Dec 2024 16:38:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id CC3A16B0093 for <linux-mm@kvack.org>; Tue, 10 Dec 2024 16:38:14 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 8938D1C7BAA for <linux-mm@kvack.org>; Tue, 10 Dec 2024 21:38:14 +0000 (UTC) X-FDA: 82880362488.16.2E4B431 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by imf25.hostedemail.com (Postfix) with ESMTP id AD4B7A0002 for <linux-mm@kvack.org>; Tue, 10 Dec 2024 21:37:56 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=HjjotpAV; spf=pass (imf25.hostedemail.com: domain of gourry@gourry.net designates 209.85.160.172 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733866671; a=rsa-sha256; cv=none; b=58ax8Q/foSN2EDCcD3rQBN1PFKlEOCgVDnu5rFpTzNKlL4TrYsUxP3TOWyM3T3GGKK0V5l 0Snq/A/vvjKHd8Bdmg5Wn2koo8qvC9mfjk4ftHJLTX+hTIVyusSyf9tMKEvX+JSLAPdCRk rQm8859ZUeqrSWueGFMunL+C0IKTxB4= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=HjjotpAV; spf=pass (imf25.hostedemail.com: domain of gourry@gourry.net designates 209.85.160.172 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733866671; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=OQZEugtHND2zHmh8pPoKkZgS6JzSbLVFT2/QKBK/z+4=; b=lNqg9nLS4XKn94qrungWNTxXNVA437GgyhTxZVZgxtVpOfzBFzeD13JkP2U3x1CXccik0z LV32XyN/M1Tnfp9oxYGNH/k84kC7L4JCAma6rQmW0GeggS7aVR0S2KWS50i/poWImWPN5P IFYG2K5ppD8noNYZvR6UqwbJ4rRIz4M= Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-4676e708aeaso18939911cf.1 for <linux-mm@kvack.org>; Tue, 10 Dec 2024 13:38:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1733866691; x=1734471491; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OQZEugtHND2zHmh8pPoKkZgS6JzSbLVFT2/QKBK/z+4=; b=HjjotpAVeUovF2tqnmdzoAUnE9pr3jLZz73RyQGtlbnJa2oc6rYaJa7Fo8my2sJ4Of mKp6xcYNQVDYYmzIfKSXy9eGgY7dCq0RbfWhuN3kYRIlWlQBxXTFJzA7/NCy3gRUP49h wLuAo+cKMWa1mbbDvQKFzE6/REcxz9iYKAmxl1SNjd0NnXcSEk4aIrmHnIjLM3EuBZPR DtVbFexQHxt1GeC0jodOidpF76ydttwb40QM9bmUV3xbyGidAHLva1NmWyQ320OtRaJ9 v3xyovO/D1CEQwTF//vTJ8/UNZua1WVzihBry5EHSjE35pgcR2+NFVS2/vByu0flPKPt cgsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733866691; x=1734471491; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OQZEugtHND2zHmh8pPoKkZgS6JzSbLVFT2/QKBK/z+4=; b=pf5YsyDMtScabxQYnNJ8/aP/pGr5Ua9TnYN7/shoPmBvHywhLZhyV6Y2WATkdSZbRK HrWD+C3OQuP5pKFoAWKUGKlpi8thhZSjq+N9EB63G+PYzyRB1KjJbDXe6KAyWdN7uvQJ AYYXTzpWTxET5Ej5TTCUGOEaNrLmNpnl1TWTXvzx22SZbbytWNrTF1jRNLqkP/omUY31 5jcyo9ib75c/wdy8ygj5oEElqHqNy8h+iL9/YkV9eI49VbEkV20Y+tk66ZH6RAVh2OmF b6CvjWfqldCSURqxjCLMt293X0YbjLdnWGUzI8R+K5ya/qiingRFYT7oFeKMJ3UL9Wdt IQuA== X-Gm-Message-State: AOJu0YyrB7vqsovWkdyGigRT32IyEad+8cSp/qCmLfADKZq+Si7ia+gQ coXnAuXZKP9ByB0NmGrTbm6y2me8qeZtw0rpb/uiJdQWXV9fFrXu/pSeltNTYTX2QQbYDyXHhwd u X-Gm-Gg: ASbGncsKvV7JiKJKuh40HqYG3Z39mYiaS6hTrtSJkXWIPPNzru/mv2/VXiwten+Yj6r YQsnXNu5S3r+MRszVe9QYQ0N6CACsXColLq9OYTmrLU4rpVLFoacSRNLU+f65zNNEn6NJP757Cd 3ZbuTZ7KrlFhw4pMJ0JTDsLsxLEp+ZmYkuk4UN+JWSLcGIQOilZEHQS+uUiyt/mjKzHD4pVTks5 VGQPFoMXSXhn6/E+TDjCdHq//+IwC+zrwyYMXXma7yD3E0N2iHdlzl6MTE4tDIFTN1mYD8U/SUR srBrbR8jFq+xvh3FboSwLtqle/6G6hNWQwnaT7o= X-Google-Smtp-Source: AGHT+IFYbR7aXy36yPVN9o7PP/Nyz3CEWrs6BuemC8qkn+p43Ye5cXgiGx1LfhBNIjaaOLXxBrl2Ig== X-Received: by 2002:ac8:5947:0:b0:466:9197:b503 with SMTP id d75a77b69052e-46789379413mr8570201cf.46.1733866691608; Tue, 10 Dec 2024 13:38:11 -0800 (PST) Received: from PC2K9PVX.TheFacebook.com (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-467296f61f6sm65978991cf.43.2024.12.10.13.38.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 13:38:10 -0800 (PST) From: Gregory Price <gourry@gourry.net> To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, nehagholkar@meta.com, abhishekd@meta.com, kernel-team@meta.com, david@redhat.com, nphamcs@gmail.com, gourry@gourry.net, akpm@linux-foundation.org, hannes@cmpxchg.org, kbusch@meta.com, ying.huang@linux.alibaba.com Subject: [RFC v2 PATCH 1/5] migrate: Allow migrate_misplaced_folio_prepare() to accept a NULL VMA. Date: Tue, 10 Dec 2024 16:37:40 -0500 Message-ID: <20241210213744.2968-2-gourry@gourry.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241210213744.2968-1-gourry@gourry.net> References: <20241210213744.2968-1-gourry@gourry.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AD4B7A0002 X-Stat-Signature: 3h1y7s5s7fzca8rxgt5mucr4a351354q X-R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OFJ23J5NMbuiI89yPesUSJ3LlXC/24+Emc4yOTY/Z4z7e7Qq4Siiow/2m9bQ4rQZLQDN1GSDCeeMVuPPjEtziChEeM91ICDTQuBIdG9D9MCHZ+aPfBCSgnr+lkbKCxJo4acFxHx8rBbCIWVlgAnWDCXR9fx0hz7QEJiE7fYsKvmlYY2nT403t6rW3vvyp+H1cv6jIm9ZZ0rEeZx8/I8V9yStn1M32TRwi6UgiSZri4z9YjZ12WfCh+l7ZBUo//E/ufmOnZr4kgUx9E6vimUj1avVBEPm/e30Sd02wJLlYW71IMgJmVMkxS0I5y4oLgjEMPq9bI8RCEvjXbEmzr+R+jxxL9llH3Gb3ZLoX7263JESzFZKy X-Bogosity: Ham, tests=bogofilter, spamicity=0.267604, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Promotion of Unmapped Page Cache Folios.
|
expand
|
diff --git a/mm/migrate.c b/mm/migrate.c index e9e00d1d1d19..af07b399060b 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2632,7 +2632,7 @@ int migrate_misplaced_folio_prepare(struct folio *folio, * See folio_likely_mapped_shared() on possible imprecision * when we cannot easily detect if a folio is shared. */ - if ((vma->vm_flags & VM_EXEC) && + if (vma && (vma->vm_flags & VM_EXEC) && folio_likely_mapped_shared(folio)) return -EACCES;
migrate_misplaced_folio_prepare() may be called on a folio without a VMA, and so it must be made to accept a NULL VMA. Suggested-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Gregory Price <gourry@gourry.net> --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)