Re: [PATCH v3 3/4] crypto: ccp: Fix possible deadlock in SEV init failure path
From: Sean Christopherson
Date: Mon Jul 06 2026 - 14:23:04 EST
On Fri, Jul 03, 2026, Herbert Xu wrote:
> On Tue, Jun 02, 2026 at 03:36:34PM -0700, Atish Patra wrote:
> > From: Atish Patra <atishp@xxxxxxxx>
> >
> > __sev_platform_init_handle_init_ex_path() calls
> > rmp_mark_pages_firmware() with locked=false while the parent
> > function of init_ex_path already acquired the sev_cmd_mutex.
> > In the case of an RMPUPDATE failure for any page after the first, the cleanup
> > path would invoke reclaim pages which would result in a deadlock in
> > sev_do_cmd.
> >
> > Pass locked=true to honor the lock status of the parent function.
> >
> > Fixes: 7364a6fbca45 ("crypto: ccp: Handle non-volatile INIT_EX data when SNP is enabled")
> >
> > Reported-by: Chris Mason <clm@xxxxxxxx>
> > Assisted-by: Claude:claude-opus-4-6
> > Fixes: 7364a6fbca45 ("crypto: ccp: Handle non-volatile INIT_EX data when SNP is enabled")
> > Reviewed-by: Tom Lendacky <thomas.lendacky@xxxxxxx>
> > Signed-off-by: Atish Patra <atishp@xxxxxxxx>
> > ---
> > drivers/crypto/ccp/sev-dev.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Acked-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Want to take patches 3 and 4 through your tree? I'll grab 1 and 2; there's no
dependency between the KVM changes and the crypto changes.