Re: [PATCH] mm/madvise: fix MADV_FREE handling for PMD-mapped THPs
From: David Hildenbrand
Date: Fri Nov 20 2026 - 04:19:00 EST
On Thu, 19 Nov 2026 17:04:34 +0100, David Hildenbrand (Arm) wrote:
> After MADV_FREE cleared the dirty flag of an anonymous folio, reclaim will
> later free the folio without writing it back if no mappings are dirty.
>
> If our folio is still in the swap cache, the swap entries then point at
> swap slots that were never written, exposing stale content of the swap
> device. Bad.
>
> [...]
Applied, thanks!
tree: mm/core.git
branch: for-next-fixes
Applied patches will appear soon in mm-next, followed by linux-next.
Please report any outstanding bugs that were missed during review, so we
can either drop the patch series or decide how to fix it up.
It is encouraged to provide Acked-bys, Reviewed-bys, and Tested-bys even
though the patches have already been applied. If possible, patch trailers
will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. Further, this is not a guarantee that the
patches will go upstream. If in doubt, please check the listed branch.
[1/1] mm/madvise: fix MADV_FREE handling for PMD-mapped THPs
https://git.kernel.org/mm/core/c/344d84f4
--
Cheers,
David