WSL2-Linux-Kernel/security/keys/trusted-keys
Dave Kleikamp bfa4a733ae KEYS: trusted: Avoid calling null function trusted_key_exit
[ Upstream commit c5d1ed846e ]

If one loads and unloads the trusted module, trusted_key_exit can be
NULL. Call it through static_call_cond() to avoid a kernel trap.

Fixes: 5d0682be31 ("KEYS: trusted: Add generic trusted keys framework")
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jarkko Sakkinen <jarkko@kernel.org>
Cc: Mimi Zohar <zohar@linux.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Cc: James Morris <jmorris@namei.org>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: linux-integrity@vger.kernel.org
Cc: keyrings@vger.kernel.org
Cc: linux-security-module@vger.kernel.org
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:23:09 +02:00
..
Makefile KEYS: trusted: Introduce TEE based Trusted Keys 2021-04-14 16:30:30 +03:00
tpm2key.asn1 security: keys: trusted: use ASN.1 TPM2 key format for the blobs 2021-04-14 16:30:30 +03:00
trusted_core.c KEYS: trusted: Avoid calling null function trusted_key_exit 2022-04-08 14:23:09 +02:00
trusted_tee.c KEYS: trusted: Introduce TEE based Trusted Keys 2021-04-14 16:30:30 +03:00
trusted_tpm1.c KEYS: trusted: Fix memory leak on object td 2021-05-12 22:36:36 +03:00
trusted_tpm2.c trusted-keys: match tpm_get_ops on all return paths 2021-05-12 22:36:37 +03:00