diff options
-rw-r--r-- | mm/hugetlb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 6121b57bbe96..6f978218c2c8 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -907,7 +907,7 @@ int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
907 | */ | 907 | */ |
908 | pte = huge_pte_offset(mm, vaddr & HPAGE_MASK); | 908 | pte = huge_pte_offset(mm, vaddr & HPAGE_MASK); |
909 | 909 | ||
910 | if (!pte || pte_none(*pte)) { | 910 | if (!pte || pte_none(*pte) || (write && !pte_write(*pte))) { |
911 | int ret; | 911 | int ret; |
912 | 912 | ||
913 | spin_unlock(&mm->page_table_lock); | 913 | spin_unlock(&mm->page_table_lock); |