From b5434d927f9274c5a7d5d459de64359747a9505c Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Tue, 10 Jan 2012 15:07:21 -0800 Subject: [PATCH] --- yaml --- r: 283000 b: refs/heads/master c: ef009b25f4f8a77d2b32067d424d5ac757dcdc5b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/hugetlb.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 8183bc6004da..88fcd8421eab 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a734bcc812146cfba530e1adaf609fce1357982e +refs/heads/master: ef009b25f4f8a77d2b32067d424d5ac757dcdc5b diff --git a/trunk/mm/hugetlb.c b/trunk/mm/hugetlb.c index 2c551b28ba69..49e693b7fd0c 100644 --- a/trunk/mm/hugetlb.c +++ b/trunk/mm/hugetlb.c @@ -2349,6 +2349,9 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma, /* * Hugetlb_cow() should be called with page lock of the original hugepage held. + * Called with hugetlb_instantiation_mutex held and pte_page locked so we + * cannot race with other handlers or page migration. + * Keep the pte_same checks anyway to make transition from the mutex easier. */ static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, pte_t *ptep, pte_t pte,