lkml.org 
[lkml]   [2012]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/3] flush_tlb_range() needs ->page_table_lock when ->mmap_sem is not held
Is this safe? And why does it need it? Please add more explanations.

Linus

On Sun, Mar 4, 2012 at 10:40 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
>  mm/hugetlb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 5f34bd8..a876871 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -2277,8 +2277,8 @@ void __unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
>                        set_page_dirty(page);
>                list_add(&page->lru, &page_list);
>        }
> -       spin_unlock(&mm->page_table_lock);
>        flush_tlb_range(vma, start, end);
> +       spin_unlock(&mm->page_table_lock);
>        mmu_notifier_invalidate_range_end(mm, start, end);
>        list_for_each_entry_safe(page, tmp, &page_list, lru) {
>                page_remove_rmap(page);
> --
> 1.7.2.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-03-05 21:33    [W:0.800 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site