lkml.org 
[lkml]   [2010]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 02/13] mm: Revalidate anon_vma in page_lock_anon_vma()
    From
    Date
    On Fri, 2010-04-09 at 16:29 +0900, KOSAKI Motohiro wrote:
    >
    >
    > diff --git a/mm/rmap.c b/mm/rmap.c
    > index 8b088f0..b4a0b5b 100644
    > --- a/mm/rmap.c
    > +++ b/mm/rmap.c
    > @@ -295,7 +295,7 @@ struct anon_vma *page_lock_anon_vma(struct page
    > *page)
    > unsigned long anon_mapping;
    >
    > rcu_read_lock();
    > - anon_mapping = (unsigned long) ACCESS_ONCE(page->mapping);
    > + anon_mapping = (unsigned long) rcu_dereference(page->mapping);
    > if ((anon_mapping & PAGE_MAPPING_FLAGS) != PAGE_MAPPING_ANON)
    > goto out;
    > if (!page_mapped(page))

    Yes, I think this is indeed required.

    I'll do a new version of the patch that includes the comment updates
    requested by Andrew.



    \
     
     \ /
      Last update: 2010-04-09 10:47    [W:0.022 / U:1.020 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site