[PATCH v2 3/3] fork: lock VMAs of the parent process when forking

Linus Torvalds torvalds at linux-foundation.org
Sat Aug 5 08:49:40 AEST 2023

On Fri, 4 Aug 2023 at 14:46, Mateusz Guzik <mjguzik at gmail.com> wrote:
> I don't see it mentioned in the discussion, so at a risk of ruffling
> feathers or looking really bad I'm going to ask: is the locking of any
> use if the forking process is single-threaded? T

Sadly, we've always been able to access the mm from other processes,
so the locking is - I think - unavoidable.

And some of those "access from other processes" aren't even uncommon
or special. It's things like "ps" etc, that do it just to see the
process name and arguments.


More information about the Linuxppc-dev mailing list