diff options
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 5003349637f..a458517187c 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1342,6 +1342,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. |