Re: [PATCH mm-hotfixes] mm/zswap: add missing kunmap_local()

From: Nhat Pham

Date: Wed Mar 18 2026 - 19:15:55 EST


On Mon, Mar 16, 2026 at 7:01 AM Lorenzo Stoakes (Oracle) <ljs@xxxxxxxxxx> wrote:
>
> Commit e2c3b6b21c77 ("mm: zswap: use SG list decompression APIs from
> zsmalloc") updated zswap_decompress() to use the scatterwalk API to copy
> data for uncompressed pages.
>
> In doing so, it mapped kernel memory locally for 32-bit kernels using
> kmap_local_folio(), however it never unmapped this memory.
>
> This resulted in the linked syzbot report where a BUG_ON() is triggered due
> to leaking the kmap slot.
>
> This patch fixes the issue by explicitly unmapping the established kmap.
>
> Reported-by: syzbot+fe426bef95363177631d@xxxxxxxxxxxxxxxxxxxxxxxxx
> Closes: https://lore.kernel.org/all/69b75e2c.050a0220.12d28.015a.GAE@xxxxxxxxxx
> Fixes: e2c3b6b21c77 ("mm: zswap: use SG list decompression APIs from zsmalloc")
> Signed-off-by: Lorenzo Stoakes (Oracle) <ljs@xxxxxxxxxx>

Acked-by: Nhat Pham <nphamcs@xxxxxxxxx>

Thanks for the catch, Lorenzo :)