Re: [PATCH] mm: fix hang on anon_vma->root->lock

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Hugh Dickins
Date: Friday, August 27, 2010 - 2:28 pm

On Fri, Aug 27, 2010 at 1:56 PM, Christoph Lameter <cl@linux.com> wrote:

No second version of the patch, no.  As I said already, it's that
second page_mapped check which gives the guarantee that the anon_vma
has not yet been freed, hence we've locked the correct object.


Yes. (not counting RCU's read "lock" as a lock).


No, SLAB_DESTROY_BY_RCU gives us just the stablity we need to take the lock.


Yes, unlikely but possible.  (Well, actually, is it possible?  It can
be unmapped on exit without any lock, but unmapping for pageout would
require the page lock, would insert a swp_entry_t, and mapping again
would go to do_swap_page which would again require the page lock.  But
never mind that, let's assume there is a way it can be unmapped and
mapped again.)  The thing is, page->mapping will point to the same
anon_vma throughout, that only gets reset when the page is freed, and
there should be nowhere else that modifies page->mapping once it's
been set to anon_vma - if you know of somewhere, please point to it,
we do need to examine that case.







--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Hugh Dickins, (Wed Aug 25, 11:12 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, David Miller, (Wed Aug 25, 11:41 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Hugh Dickins, (Thu Aug 26, 3:54 am)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Rik van Riel, (Thu Aug 26, 6:32 am)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, David Miller, (Thu Aug 26, 12:00 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Andrea Arcangeli, (Thu Aug 26, 4:50 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Andrea Arcangeli, (Thu Aug 26, 5:19 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Hugh Dickins, (Thu Aug 26, 6:43 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Andrea Arcangeli, (Fri Aug 27, 2:55 am)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Hugh Dickins, (Fri Aug 27, 9:43 am)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Christoph Lameter, (Fri Aug 27, 10:13 am)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Hugh Dickins, (Fri Aug 27, 10:55 am)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Christoph Lameter, (Fri Aug 27, 12:29 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Hugh Dickins, (Fri Aug 27, 1:14 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Christoph Lameter, (Fri Aug 27, 1:56 pm)
Re: [PATCH] mm: fix hang on anon_vma->root->lock, Hugh Dickins, (Fri Aug 27, 2:28 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Hugh Dickins, (Fri Aug 27, 2:33 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Christoph Lameter, (Fri Aug 27, 4:06 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Hugh Dickins, (Fri Aug 27, 6:07 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Christoph Lameter, (Fri Aug 27, 7:47 pm)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Peter Zijlstra, (Sat Aug 28, 3:17 am)
Re: [PATCH] mm: fix hang on anon_vma-&gt;root-&gt;lock, Andrea Arcangeli, (Sat Aug 28, 8:54 am)