diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2022-06-16 10:26:18 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-06-24 17:12:29 +0800 |
commit | 1b05ece0c931536c0a38a9385e243a7962e933f6 (patch) | |
tree | 9298da00b44dfcbdfd5101605a9eb7baa0e0a59f /arch/powerpc/crypto | |
parent | bffa1fc065893a14703545efba7d69bb4082b18a (diff) | |
download | linux-1b05ece0c931536c0a38a9385e243a7962e933f6.tar.bz2 |
crypto: ccp - During shutdown, check SEV data pointer before using
On shutdown, each CCP device instance performs shutdown processing.
However, __sev_platform_shutdown_locked() uses the controlling psp
structure to obtain the pointer to the sev_device structure. However,
during driver initialization, it is possible that an error can be received
from the firmware that results in the sev_data pointer being cleared from
the controlling psp structure. The __sev_platform_shutdown_locked()
function does not check for this situation and will segfault.
While not common, this scenario should be accounted for. Add a check for a
NULL sev_device structure before attempting to use it.
Fixes: 5441a07a127f ("crypto: ccp - shutdown SEV firmware on kexec")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/powerpc/crypto')
0 files changed, 0 insertions, 0 deletions