From: Andrew Morton Date: Wed, 22 Jun 2022 00:51:42 +0000 (-0700) Subject: mm-thp-kill-transparent_hugepage_active-fix X-Git-Tag: maple_v12_fixes~92 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a78b3a1bb151afb840e10da29aeb5324830c53e4;p=users%2Fjedix%2Flinux-maple.git mm-thp-kill-transparent_hugepage_active-fix check vma->vm_mm, per Zach Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Vlastimil Babka Cc: Yang Shi Cc: Zach O'Keefe Signed-off-by: Andrew Morton --- diff --git a/mm/huge_memory.c b/mm/huge_memory.c index df04c0057271..fbe02815c41a 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -73,6 +73,9 @@ bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags, bool smaps) { + if (!vma->vm_mm) + return false; + if (!transhuge_vma_enabled(vma, vm_flags)) return false;