Re: [PATCH 5.15.y 6.1.y 6.6.y 1/1] mm/vmscan: flush deferred TLB before freeing large folios

From: Jiayuan Chen

Date: Wed Jul 08 2026 - 21:06:04 EST



On 7/9/26 12:18 AM, Sasha Levin wrote:
On Wed, Jul 08, 2026 at 12:12:36PM +0800, Jiayuan Chen wrote:
Flush the deferred batch before freeing a large folio inline, the same way
the order-0 path already waits for the flush.
Queued for 6.6 and 6.1 with Matthew's Reviewed-by added, thanks.


Thanks Sasha.


destroy_compound_page was recently renamed to destroy_large_folio.
So it would be conflict when this patch was applied to 5.15/6.1
It actually applied cleanly to the current 6.1.y (that tree already
uses folio_test_large()/destroy_large_folio() there), but it does not
apply to 5.15.y, which is still page-based
(PageTransHuge()/destroy_compound_page()). Could you send a tested
per-branch version for 5.15.y? 5.10.y has the identical vulnerable code
shape, so a 5.10.y version would be welcome as well.


I will try to reproduce and fix in 5.15 and 5.10.