[PATCH 10/46] mm/huge_memory: fix list corruption when deferred_split_scan() races with deferred_split_folio()
David Hildenbrand (Arm)
david at kernel.org
Tue Oct 27 12:19:33 PDT 2026
On 10/27/26 19:03, Mani Tofigh wrote:
>
>
> On 10/27/26 11:15 AM, David Hildenbrand (Arm) wrote:
>> While I have your attention: This variant works, a different proposal used
>>
>> list_del_init_careful()
>>
>> instead. However, that is documented to require list_empty_careful().
>>
>> Do you think it's worth looking into?
>>
>>
>> https://lore.kernel.org/all/20261026-thpsplit-careful-v1-1-
>> d357d70fd6f4 at columbia.edu/
>
> In this case the careful variant is fine without
> list_empty_careful() since it writes ->prev first
> and then ->next with smp_store_release(), and
> __list_lru_add() only writes to the entry after it
> sees -> next == entry so it can't race with the ->prev
> write anymore.
>
> But your version also covers the PG_partially_mapped
> race your comment mentions, which mine doesn't, so
> it's the more complete fix anyway.
Thanks for checking!
--
Cheers,
David
More information about the kexec
mailing list