Re: [v3 PATCH] mm: introduce arg_lock to protect arg_start|end and env_start|end in mm_struct

From: Cyrill Gorcunov
Date: Tue Apr 10 2018 - 16:06:57 EST


On Tue, Apr 10, 2018 at 12:33:35PM -0700, Yang Shi wrote:
...
>
> The race condition is just valid when protecting start_brk, brk, start_data
> and end_data with the new lock, but keep using mmap_sem in brk path.
>
> So, we should just need make a little tweak to have mmap_sem protect
> start_brk, brk, start_data and end_data, then have the new lock protect
> others so that we still can remove mmap_sem in proc as the patch is aimed to
> do.

+1. Sounds like a plan.