> diff --git v3.11-rc3.orig/mm/huge_memory.c v3.11-rc3/mm/huge_memory.c
> index 243e710..3cb29e1 100644
> --- v3.11-rc3.orig/mm/huge_memory.c
> +++ v3.11-rc3/mm/huge_memory.c
...
> @@ -864,14 +868,17 @@ int copy_huge_pmd(struct mm_struct *dst_mm, struct 
> mm_struct *src_mm,
>       pmd_t pmd;
>       pgtable_t pgtable;
>       int ret;
> +     spinlock_t *uninitialized_var(dst_ptl), *uninitialized_var(src_ptl);
>  
>       ret = -ENOMEM;
>       pgtable = pte_alloc_one(dst_mm, addr);
>       if (unlikely(!pgtable))
>               goto out;
>  
> -     spin_lock(&dst_mm->page_table_lock);
> -     spin_lock_nested(&src_mm->page_table_lock, SINGLE_DEPTH_NESTING);
> +     dst_ptl = huge_pmd_lockptr(dst_mm, dst_ptl);
> +     src_ptl = huge_pmd_lockptr(src_mm, src_ptl);

I found one mistake. This should be:

+       dst_ptl = huge_pmd_lockptr(dst_mm, dst_pmd);
+       src_ptl = huge_pmd_lockptr(src_mm, src_pmd);

Thanks,
Naoya Horiguchi

> +     spin_lock(dst_ptl);
> +     spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING);
>  
>       ret = -EAGAIN;
>       pmd = *src_pmd;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to