On 6/4/24 12:47, Kim Phillips wrote:
Fix a null pointer dereference induced by DEBUG_TEST_DRIVER_REMOVE. Return from __sev_snp_shutdown_locked() if the psp_device or the sev_device structs are not initialized. Without the fix, the driver will produce the following splat:
Fixes: 1ca5614b84ee ("crypto: ccp: Add support to initialize the AMD-SP for SEV-SNP") Cc: stable@vger.kernel.org Signed-off-by: Kim Phillips kim.phillips@amd.com Reviewed-by: Liam Merwick liam.merwick@oracle.com Reviewed-by: Mario Limonciello mario.limonciello@amd.com Reviewed-by: John Allen john.allen@amd.com
Reviewed-by: Tom Lendacky thomas.lendacky@amd.com
v2:
- Correct the Fixes tag (Tom L.)
- Remove log timestamps, elaborate commit text (John Allen)
- Add Reviews-by.
v1:
drivers/crypto/ccp/sev-dev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)