Re: [PATCH] crypto: ccp - Fix leaking the same page twice
From: Tycho Andersen
Date: Wed Mar 04 2026 - 17:17:51 EST
On Wed, Mar 04, 2026 at 12:39:34PM -0800, Guenter Roeck wrote:
> Commit 551120148b67 ("crypto: ccp - Fix a case where SNP_SHUTDOWN is
> missed") fixed a case where SNP is left in INIT state if page reclaim
> fails. It removes the transition to the INIT state for this command and
> adjusts the page state management.
>
> While doing this, it added a call to snp_leak_pages() after a call to
> snp_reclaim_pages() failed. Since snp_reclaim_pages() already calls
> snp_leak_pages() internally on the pages it fails to reclaim, calling
> it again leaks the exact same page twice.
>
> Fix by removing the extra call to snp_leak_pages().
Reviewed-by: Tycho Andersen (AMD) <tycho@xxxxxxxxxx>