Message ID | 1389628849-1614-149-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index ac2546c..0db1517 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1354,6 +1354,13 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, goto out_unlock; } + /* Bail if we fail to protect against THP splits for any reason */ + if (unlikely(!anon_vma)) { + put_page(page); + page_nid = -1; + goto clear_pmdnuma; + } + /* * Migrate the THP to the requested node, returns with page unlocked * and pmd_numa cleared.