Skip to content
Commit 72fad713 authored by Adam Litke's avatar Adam Litke Committed by Linus Torvalds
Browse files

hugetlb: handle write-protection faults in follow_hugetlb_page

The follow_hugetlb_page() fix I posted (merged as git commit
5b23dbe8

) 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: default avatarAdam Litke <agl@us.ibm.com>
Acked-by: default avatarDave Kleikamp <shaggy@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8805f238
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment