Re: [PATCH 13/16] mm, swap: defer xswap shrink to workqueue to avoid lock recursion

From: Nhat Pham

Date: Wed Sep 02 2026 - 11:00:24 EST


On Thu, Aug 27, 2026 at 5:57 AM Baoquan He <hebaoquan@xxxxxxxxxx> wrote:
>
> xswap_try_shrink() was called directly from __free_cluster() while
> holding ci->lock. The shrink path calls xswap_unmap_clusters()
> which unmaps vmalloc pages backing cluster_info, and on return
> swap_cache_del_folio() tries swap_cluster_unlock(ci) on the now-
> unmapped address - crashing on a not-present page.

This reads like a bug. It would be a bisectability problem to not
squash this to an earlier patch, no?