vma_iterator and /proc/$pid/maps
Add a vma_iterator which is a very thin wrapper over the maple tree
interfaces. Use it in the implementation of /proc/$pid/maps. Remove
it from the protection of the mmap_sem; switch to rcu_read_lock()
protection.
I believe hold_task_mempolicy() is safe to call without the protection
of the mmap_sem. We have a reference on struct task_struct, and
changing ->mempolicy is protected by task_lock(), which is acquired
in hold_task_mempolicy().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 files changed