diff --git a/[refs] b/[refs] index e6c74afb13d7..3acec5d75cdd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6c6d5280431544e4036886ea74e3334a98bc5f96 +refs/heads/master: c27fe4c8942d3ca715986f79cc26f44608d7d9fb diff --git a/trunk/include/linux/mm.h b/trunk/include/linux/mm.h index 6321e840e21d..3c5505a3bc49 100644 --- a/trunk/include/linux/mm.h +++ b/trunk/include/linux/mm.h @@ -911,6 +911,8 @@ unsigned long unmap_vmas(struct mmu_gather *tlb, * @pte_entry: if set, called for each non-empty PTE (4th-level) entry * @pte_hole: if set, called for each hole at all levels * @hugetlb_entry: if set, called for each hugetlb entry + * *Caution*: The caller must hold mmap_sem() if @hugetlb_entry + * is used. * * (see walk_page_range for more details) */ diff --git a/trunk/mm/pagewalk.c b/trunk/mm/pagewalk.c index ee4ff87c58c1..f7929406e776 100644 --- a/trunk/mm/pagewalk.c +++ b/trunk/mm/pagewalk.c @@ -181,6 +181,9 @@ static int walk_hugetlb_range(struct vm_area_struct *vma, * * If any callback returns a non-zero value, the walk is aborted and * the return value is propagated back to the caller. Otherwise 0 is returned. + * + * walk->mm->mmap_sem must be held for at least read if walk->hugetlb_entry + * is !NULL. */ int walk_page_range(unsigned long addr, unsigned long end, struct mm_walk *walk)