Re: [PATCH 1/2] mm,migration: Prevent rmap_walk_[anon|ksm] seeing the wrong VMA information

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Wednesday, May 5, 2010 - 11:02 am

On Wed, 5 May 2010, Mel Gorman wrote:

Heh. This is the same logic I just sent out. However:


RCU should guarantee that this spin_lock() is valid, but:


We're not guaranteed that the 'anon_vma->head' list is non-empty.

Somebody could have freed the list and the anon_vma and we have a stale 
'page->anon_vma' (that has just not been _released_ yet). 

And shouldn't that be 'list_first_entry'? Or &anon_vma->head.next?

How did that line actually work for you? Or was it just a "it boots", but 
no actual testing of the rmap walk?

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

Messages in current thread:
[PATCH 0/2] Fix migration races in rmap_walk() V5, Mel Gorman, (Wed May 5, 6:14 am)
Re: [PATCH 1/2] mm,migration: Prevent rmap_walk_[anon|ksm] ..., Linus Torvalds, (Wed May 5, 11:02 am)
Re: [PATCH 1/2] mm,migration: Prevent rmap_walk_[anon|ksm] ..., KAMEZAWA Hiroyuki, (Thu May 6, 12:38 am)
Re: [PATCH 1/2] mm,migration: Prevent rmap_walk_[anon|ksm] ..., KAMEZAWA Hiroyuki, (Thu May 6, 10:49 pm)