Re: [PATCH v8 15/16] mm: make vma cache SLAB_TYPESAFE_BY_RCU

From: Liam R. Howlett
Date: Fri Jan 10 2025 - 15:48:28 EST


* Suren Baghdasaryan <surenb@xxxxxxxxxx> [250110 15:35]:
> On Fri, Jan 10, 2025 at 11:46 AM 'Liam R. Howlett' via kernel-team
>
> >
> > rwsem_acquire_read(old lock)
> > __refcount_inc_not_zero_limited() fails
>
> Are we looking at the same code
> (https://lore.kernel.org/all/20250109023025.2242447-12-surenb@xxxxxxxxxx/)?
> The sequence should be reversed here like this:
>
> if (!__refcount_inc_not_zero_limited())
> return false;
> rwsem_acquire_read(old lock)
>
> and because __refcount_inc_not_zero_limited() fails,
> rwsem_acquire_read(old lock) should never be called.
>

We are not, I had an older version of the patch from the 7th.

Sorry for the confusion.

Thanks,
Liam