Re: [PATCH v9 3/4] mm/vmalloc: free unused pages on vrealloc() shrink

Shivam Kalra
2026-04-02T02:01:43Z

On 02/04/26 02:49, Alice Ryhl wrote:
> Should we set nr_pages first? Right now, another thread may observe the
> range being unmapped but still see the old nr_pages value.

Isn't this exactly what the spinlock is for? The observer is supposed to
free the lock after they are done observing the value.
Can you point out the code where this might not be the case? Or am I
missing something?