projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mm: hugetlb: Copy general hugetlb code from x86 to mm.
[firefly-linux-kernel-4.4.55.git]
/
mm
/
rmap.c
diff --git
a/mm/rmap.c
b/mm/rmap.c
index 6280da86b5d6761ed8a245c3fadb6e42015216c5..3f6077461aeacaac7d80049fd5043b49547c9d80 100644
(file)
--- a/
mm/rmap.c
+++ b/
mm/rmap.c
@@
-600,7
+600,11
@@
pte_t *__page_check_address(struct page *page, struct mm_struct *mm,
spinlock_t *ptl;
if (unlikely(PageHuge(page))) {
+ /* when pud is not present, pte will be NULL */
pte = huge_pte_offset(mm, address);
+ if (!pte)
+ return NULL;
+
ptl = &mm->page_table_lock;
goto check;
}