crypto: ccp - Ensure psp_ret is always init'd in __sev_platform_init_locked()
Subsystems (3)
PATCH 1/1 crypto: ccp - Ensure psp_ret is always init'd in __sev_platform_init_locked()
Initialize psp_ret inside of __sev_platform_init_locked() because there are many failure paths with PSP initialization that do not set __sev_do_cmd_locked().
Fixes e423b9d75e77: ("crypto: ccp - Move SEV_INIT retry for corrupted data")
Signed-off-by Peter Gonda <[email protected]>
Reported-by Dan Carpenter <[email protected]>
Cc Tom Lendacky <[email protected]>
Cc Brijesh Singh <[email protected]>
Cc Marc Orr <[email protected]>
Cc Herbert Xu <[email protected]>
Cc John Allen <[email protected]>
Cc "David S. Miller" <[email protected]>
--- drivers/crypto/ccp/sev-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/ccp/sev-dev.c +1 -1
@@ -413,7 +413,7 @@ static int __sev_platform_init_locked(int *error) {struct psp_device *psp = psp_master;struct sev_device *sev; -int rc, psp_ret; +int rc, psp_ret =-1 ;int (*init_function)(int *error);if (!psp || !psp->sev_data)
Signature · 1 line
2.34.1.575.g55b058a8bb-goog
Herbert Xu
maintainerQuoted 16 lines · Peter Gonda
Initialize
psp_retinside of__sev_platform_init_locked()because there are many failure paths with PSP initialization that do not set__sev_do_cmd_locked().Fixes e423b9d75e77: ("crypto: ccp - Move SEV_INIT retry for corrupted data")Signed-off-by Peter Gonda <[email protected]>Reported-by Dan Carpenter <[email protected]>Cc Tom Lendacky <[email protected]>Cc Brijesh Singh <[email protected]>Cc Marc Orr <[email protected]>Cc Herbert Xu <[email protected]>Cc John Allen <[email protected]>Cc "David S. Miller" <[email protected]>
Quoted 3 lines
--- drivers/crypto/ccp/sev-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt