]> www.infradead.org Git - users/dwmw2/linux.git/commit
crypto: ccp - Ignore unconfigured CCP device on suspend/resume
authorGary R Hook <gary.hook@amd.com>
Mon, 19 Aug 2019 22:23:27 +0000 (22:23 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:23:47 +0000 (10:23 +0200)
commit90ff6dd4ced610dac6c32dbeaa3899aead7b2908
treeaa50136edb6b09a00ba1b32c6e0f9b0c9fe9b8e6
parent3c3c233738df7baf8d0dc7a0ef8d4c0e724ca5a0
crypto: ccp - Ignore unconfigured CCP device on suspend/resume

commit 5871cd93692c8071fb9358daccb715b5081316ac upstream.

If a CCP is unconfigured (e.g. there are no available queues) then
there will be no data structures allocated for the device. Thus, we
must check for validity of a pointer before trying to access structure
members.

Fixes: 720419f01832f ("crypto: ccp - Introduce the AMD Secure Processor device")
Cc: <stable@vger.kernel.org>
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ccp/ccp-dev.c