Re: [PATCH v3 1/4] mm, swap: Fix potential NULL dereference when trying a sleep table allocation

From: Andrew Morton

Date: Thu Sep 10 2026 - 20:17:45 EST


On Mon, 7 Sep 2026 17:13:53 +0800 Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx> wrote:

> The root cause of this issue is because multi-tables are updated in non
> atomic context. To be more specific, the issue could be triggerred as
> following:
>
> ...
>
> Since memory order guarantee between ci->table, as well as between
> ci->table and ci->zero_bitmap, fix the issue by making tables
> visible at the end of swap_cluster_populate().
>

Sashiko suggests this might be incomplete:
https://sashiko.dev/#/patchset/20260907091356.53026-1-shikemeng@xxxxxxxxxxxxxxx