[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241210213744.2968-2-gourry@gourry.net>
Date: Tue, 10 Dec 2024 16:37:40 -0500
From: Gregory Price <gourry@...rry.net>
To: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org,
nehagholkar@...a.com,
abhishekd@...a.com,
kernel-team@...a.com,
david@...hat.com,
nphamcs@...il.com,
gourry@...rry.net,
akpm@...ux-foundation.org,
hannes@...xchg.org,
kbusch@...a.com,
ying.huang@...ux.alibaba.com
Subject: [RFC v2 PATCH 1/5] migrate: Allow migrate_misplaced_folio_prepare() to accept a NULL VMA.
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@...xchg.org>
Signed-off-by: Gregory Price <gourry@...rry.net>
---
mm/migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.43.0
Powered by blists - more mailing lists