Re: [PATCH 3/3] mm: read remote memory without the mmap lock where possible
From: Rik van Riel
Date: Fri Jun 19 2026 - 09:47:23 EST
On Tue, 2026-06-16 at 23:19 -0700, Suren Baghdasaryan wrote:
>
> I don't think we should be using per-VMA locks if the read spans
> multiple VMAs. Doing that would risk a possibility of reading
> inconsistent data since we are locking one VMA at a time. While we
> load and read VMA, its neighboring VMA can be unmapped and another
> one
> can be mapped in its place.
How is that different from userspace overwriting
data while we are reading it, and us reading half
new, and half old contents?
We already have nothing synchronizing the contents
today.
All our locking does is protect the metadata we
use to find the memory.
--
All Rights Reversed.