Re: [RFC v3 05/17] RCU free VMAs

From: Matthew Wilcox
Date: Sun Apr 30 2017 - 01:02:08 EST


On Thu, Apr 27, 2017 at 05:52:44PM +0200, Laurent Dufour wrote:
> @@ -359,6 +359,7 @@ struct vm_area_struct {
> #endif
> struct vm_userfaultfd_ctx vm_userfaultfd_ctx;
> seqcount_t vm_sequence;
> + struct rcu_head vm_rcu_head;
> };
>
> struct core_thread {

It doesn't look like we examine the contents of the VMA until after we've
checked that the seqlock is good, so we should be able to union virtually
any entry in the VMA with the vm_rcu_head. vm_next, vm_prev, perhaps?
Or anon_vma_chain since a list_head is the same size as an rcu_head.