Message ID | 20250107000346.1338481-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 52D47E77199 for <linux-mm@archiver.kernel.org>; Tue, 7 Jan 2025 00:03:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CADC16B00C5; Mon, 6 Jan 2025 19:03:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C323B6B00C6; Mon, 6 Jan 2025 19:03:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AAC7D6B00C7; Mon, 6 Jan 2025 19:03:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 7E8706B00C5 for <linux-mm@kvack.org>; Mon, 6 Jan 2025 19:03:55 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 2BE221A0512 for <linux-mm@kvack.org>; Tue, 7 Jan 2025 00:03:55 +0000 (UTC) X-FDA: 82978707630.18.B822434 Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by imf20.hostedemail.com (Postfix) with ESMTP id 58EAE1C0007 for <linux-mm@kvack.org>; Tue, 7 Jan 2025 00:03:53 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=shHBcH37; dmarc=none; spf=pass (imf20.hostedemail.com: domain of gourry@gourry.net designates 209.85.219.52 as permitted sender) smtp.mailfrom=gourry@gourry.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736208233; 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=h+k7/fZDgwShiWAnDxVUmiJM02Oc5NicKXchGCm3s6Y=; b=xrAc/b4a+coahNuL044tNDvIp5RkXRRhbQc4ZJFw2eTItXtfaAbW4sYIAjEVoFWOCu8IRQ uPp51r/gFpHxp/z0d9hcKCETWn7Q7u7tNe4KcVybY8HQ1j+KbxwI4O43auO+gtCNXg1pgM NFTQwuVLkcjbH7tqFS3AOEnL6ubv8Kw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736208233; a=rsa-sha256; cv=none; b=m8ygUhKgqXDzwoClQVKN3vwrP7aPCqEi9G9Yjxnz/Aw2ScOeZ0ncsdQ2ZD4OtSyl1oLKS+ etVeXuSiOQsC/CZCfrzGr4VLLTn3pm3TKPoiStyr1RjzIo4LkpQ5Vby2w5QKiQzLznaLdW yJvpbJoSdP8nDcLtkX/YRXx1hGLMq9M= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=shHBcH37; dmarc=none; spf=pass (imf20.hostedemail.com: domain of gourry@gourry.net designates 209.85.219.52 as permitted sender) smtp.mailfrom=gourry@gourry.net Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-6d91653e9d7so131817206d6.1 for <linux-mm@kvack.org>; Mon, 06 Jan 2025 16:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1736208232; x=1736813032; 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=h+k7/fZDgwShiWAnDxVUmiJM02Oc5NicKXchGCm3s6Y=; b=shHBcH37yjy8ogoZsMHILb8cZn9OaRZw52f/OvSzGvznxhhFRTYcYxtXqcHCVRZYZD u316Off3JDHxoJTctHxFaalFSMIPtQzEYRDhGd8CSA5zLD/Blsn4wbNp/70bNj5LjJj6 FKFK2LxrEFbHB27RtTACI13gW36dMnyiVbH9iaqul6+m5J4IkEUnIXCkfbOXmUwFZwZl v29krnmZZMb3lhBBFRepIZai4lsBqgtvTDWBoS2JCNi5v2jzKQtZrrzGZTrT+sMSjSYe BCkzUe7vo9ifiMHLGnN5WrqWcczFnhb0jzyV/1Ey3M/wYtiqoS0ygAUVv2qJK82X0zP8 po1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736208232; x=1736813032; 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=h+k7/fZDgwShiWAnDxVUmiJM02Oc5NicKXchGCm3s6Y=; b=BWd5syPw0Pi+RIOMDwcGezynFfGLejAANBROEwAoOhvWy9NIX5Trmd7B1+DEkrL3n/ WVRHEGqXzA3DI2rYaq7gJQQ5JiAhg5YJEo482xFAn/dMHfNBY6cIGLigxfpAfsK/hYTI Owbi5RNcY/lbh/NRxRCcFQP6Hm7MISsgtZ30cpqV6FGgQcVJvbramOrChD3145XMcf44 XRi8XCfWGmsk+1ZcgonsCOw+Yi7OckxS19OVSUsE53hXIFlyhjJLt/NtOu20jjD6YDwr iflP9V6LoSPg4r/+7OmgC0nRbOyLx5TyOxMrePFrHjdmG1rZMnBt+hA3rhYpq8GHwxtw NAqg== X-Gm-Message-State: AOJu0YwzoF1Y9o7FH6eEDXJxA2DpdOX4G7gZ05XCPtJAUtcvQx7hzTUi hhO58wAorwnyglNF8lx3IUHGCpRFIEpbGuNUVQPRH0QKIzWwV0EcysN8CpllFDG1QyTmprAA7rF J X-Gm-Gg: ASbGnctYXMcxtBLd23GWf/PQ31RMJmfN3hSi+GMUW0jDsfQxLbdp0MhKQXrWWANdmy2 5VX0ih7O01YTuqDBt8G4+jMXZaKBHFRXEkkDpQll7Lz1SLXCiXpsc5jBCrDdJ9TMbx+Ccdl2Sit 5ODVqWNmwQ041OYIcRrB3VTVecmE+EShdOOcEImat++Ix72Inx2AI3kzaUNgHqHMQ0S9WgjS9pB rd/7dqOnc0TXVtOAE4X170h9hyeczBTKHgg0zgzIlmh5JRkCQTAThN8ReWdbtGNMoNnhh2cIFoX 3drEIBIcq6tA37cnxn+oKfmOizZMN0YGq2DhnBk/elEY X-Google-Smtp-Source: AGHT+IHOqKIeQ7ampwkkS1JPMTLmaW/686eOaPbp3AeW5D0x9/M0zZRBfxMo3FbicJmEkXL/0K0/aw== X-Received: by 2002:a05:6214:31a0:b0:6d8:81cd:a0d2 with SMTP id 6a1803df08f44-6dd233ad8e3mr1025601246d6.41.1736208232286; Mon, 06 Jan 2025 16:03:52 -0800 (PST) Received: from gourry-fedora-PF4VCD3F.lan (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6dd18137218sm174104476d6.57.2025.01.06.16.03.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 16:03:51 -0800 (PST) From: Gregory Price <gourry@gourry.net> To: linux-mm@kvack.org Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, nehagholkar@meta.com, abhishekd@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, feng.tang@intel.com, donettom@linux.ibm.com Subject: [PATCH v3 1/6] migrate: Allow migrate_misplaced_folio_prepare() to accept a NULL VMA. Date: Mon, 6 Jan 2025 19:03:41 -0500 Message-ID: <20250107000346.1338481-2-gourry@gourry.net> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250107000346.1338481-1-gourry@gourry.net> References: <20250107000346.1338481-1-gourry@gourry.net> MIME-Version: 1.0 Content-Transfer-Encoding: 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ouL92MR+qyqsJQCWA7/ vE0bTIuw gEmKdr+4NHBtOxNL8SzRr/k27H+AeXceKK01Y+V/HVYDmotHmNMIqtEMBAC3CunHrPe8uFWpMA2g7lpq56eib8Bkw4J6o8M3nT5E+KFCjA5r5vzEzJew6CUe0BRjesrPfqCygvdTVyYi0wA6YKI7DOEKvTwwwAJjpzUcJBJf2dpYc2JbBWgJPm6hPFJh54O6NeQiPoeuzq0rrUDQR/fiHqTpp9TE3M/uWOMBz0eK4RxK9jtRT2QQJacHgOI92wwtF+uKwIfLQmmdmOytKwH8j+kvLcrj65ncNtKpBFWcma+Fj9/NIKV6KjjLG6z7qezEtsGNr1NxnuTyOw4DQwylWZP7bjWs6NSgQno3kGt5f2hEKvRY9m8z9uZTsOAjUUMDSEPuxOXyKCWBsoFNsEvvzU4UQBtLKOLsbvsjj X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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 caadbe393aa2..ea20d9bc4f40 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2627,7 +2627,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(-)