The patch titled hugetlb: handle write-protection faults in follow_hugetlb_page has been added to the -mm tree. Its filename is hugetlb-handle-write-protection-faults-in-follow_hugetlb_page.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: hugetlb: handle write-protection faults in follow_hugetlb_page From: Adam Litke <agl@xxxxxxxxxx> The follow_hugetlb_page() fix I posted (merged as git commit 5b23dbe8173c212d6a326e35347b038705603d39) missed one case. If the pte is present, but not writable and write access is requested by the caller to get_user_pages(), the code will do the wrong thing. Rather than calling hugetlb_fault to make the pte writable, it notes the presence of the pte and continues. This simple one-liner makes sure we also fault on the pte for this case. Please apply. Signed-off-by: Adam Litke <agl@xxxxxxxxxx> Acked-by: Dave Kleikamp <shaggy@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN mm/hugetlb.c~hugetlb-handle-write-protection-faults-in-follow_hugetlb_page mm/hugetlb.c --- a/mm/hugetlb.c~hugetlb-handle-write-protection-faults-in-follow_hugetlb_page +++ a/mm/hugetlb.c @@ -907,7 +907,7 @@ int follow_hugetlb_page(struct mm_struct */ pte = huge_pte_offset(mm, vaddr & HPAGE_MASK); - if (!pte || pte_none(*pte)) { + if (!pte || pte_none(*pte) || (write && !pte_write(*pte))) { int ret; spin_unlock(&mm->page_table_lock); _ Patches currently in -mm which might be from agl@xxxxxxxxxx are hugetlb-handle-write-protection-faults-in-follow_hugetlb_page.patch hugetlb-allow-sticky-directory-mount-option.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html