projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6e9eb6
)
crypto: starfive - Skip unneeded key free
author
Jia Jie Ho
<jiajie.ho@starfivetech.com>
Tue, 5 Mar 2024 07:10:02 +0000
(15:10 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Tue, 2 Apr 2024 02:49:38 +0000
(10:49 +0800)
Skip unneeded kfree_sensitive if RSA module is using falback algo.
Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/starfive/jh7110-rsa.c
patch
|
blob
|
history
diff --git
a/drivers/crypto/starfive/jh7110-rsa.c
b/drivers/crypto/starfive/jh7110-rsa.c
index cf8bda7f0855d911bbc46734fbf69b084c443bfa..e642e948d747855fc01f1fc67afa13303690dafe 100644
(file)
--- a/
drivers/crypto/starfive/jh7110-rsa.c
+++ b/
drivers/crypto/starfive/jh7110-rsa.c
@@
-45,6
+45,9
@@
static inline int starfive_pka_wait_done(struct starfive_cryp_ctx *ctx)
static void starfive_rsa_free_key(struct starfive_rsa_key *key)
{
+ if (!key->key_sz)
+ return;
+
kfree_sensitive(key->d);
kfree_sensitive(key->e);
kfree_sensitive(key->n);