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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christoph Lameter
Date: Friday, August 27, 2010 - 1:56 pm

On Fri, 27 Aug 2010, Hugh Dickins wrote:


I do not see any check after we have taken the lock to verify that we
locked the correct object. Was there a second version of the patch?


You then are using an object from the anon_vma (the pointer) without a
lock! This is unstable therefore unless there are other constraints. The
anon_vma->lock must be taken before derefencing that pointer. The page may
have been unmapped and mapped again between the two checks. Unlikely but
possible.


I do not see a second check (*after* taking the lock) in the patch and the
way the lock is taken can be a problem in itself.

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

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