Re: [PATCH] mm/vma: avoid spurious write locks when mm->mm_lock_seq overflows

From: Jose A. Perez de Azpillaga

Date: Fri Oct 16 2026 - 05:00:22 EST


On 10/16/26 10:19 AM, Lorenzo Stoakes (ARM) wrote:
> It seems likely that you're using AI to generate these review points. Please do
> say if you're doing that, thanks.

yes, I used an LLM to find the commits I pointed out and check if my
reasoning was correct. my bad for not mentioning it. anyway, I reviewed
everything and checked that it was correct.

[snip]

>>> Cc: stable@xxxxxxxxxxxxxxx
>>
>> the parity check relies on e5e7fb278e59. before that, mm_lock_seq only
>> increments on unlock, so locked values can be odd or even. should this
>> be limited to 6.14+, with a note that older trees need a different fix?
>> a straight backport of the odd check would ignore write locks taken on
>> even cycles.
>
> I have a plan for older kernels (just make the value 64 bit...)

okay, I didn't know.

--
cheers,
jose a. p-a