Messages in this thread | | | Date | Tue, 06 Apr 2010 13:04:41 -0400 | From | Rik van Riel <> | Subject | Re: Ugly rmap NULL ptr deref oopsie on hibernate (was Linux 2.6.34-rc3) |
| |
On 04/06/2010 12:53 PM, Linus Torvalds wrote: > On Wed, 7 Apr 2010, Minchan Kim wrote: >> >> unmap_and_move >> remove_migration_ptes >> rmap_walk >> rmap_walk_anon >> >> We always has rcu_read_lock about anon page in unmap_and_move. >> So I think it's not buggy. What am I missing? > > Ok, in that case it's fine. > > However, it does bring back my comment about all those anonvma changes: > the locking is totally undocumented. > > Why isn't there a thing _saying_ that it's ok because of this? > > Why is there no comment about the locking of that 'same_vma' / > 'vma->anon_vma_chain' except for the totally nonsensical one about > page_table_lock (which doesn't protect _any_ of the other cases)?
Which other cases? When do we ever walk the "same_vma" list not from the context of the process owning the vma?
This bug in page_referenced is walking the "same_anon_vma" list, which is locked with the anon_vma->lock.
| |