diff options
author | Wang Ming <machel@vivo.com> | 2023-07-17 11:45:19 +0200 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-07-20 16:48:56 +0200 |
commit | 1f7e9067756cac5b44b9701bbe0bb83e93011e47 (patch) | |
tree | c079f9a416acc0693b23d93d313e8133ebeb7e13 /arch | |
parent | s390/mm: fix per vma lock fault handling (diff) | |
download | linux-1f7e9067756cac5b44b9701bbe0bb83e93011e47.tar.xz linux-1f7e9067756cac5b44b9701bbe0bb83e93011e47.zip |
s390/crypto: use kfree_sensitive() instead of kfree()
key might contain private part of the key, so better use
kfree_sensitive() to free it.
Signed-off-by: Wang Ming <machel@vivo.com>
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Link: https://lore.kernel.org/r/20230717094533.18418-1-machel@vivo.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/crypto/paes_s390.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/crypto/paes_s390.c b/arch/s390/crypto/paes_s390.c index d29a9d908797..38349150c96e 100644 --- a/arch/s390/crypto/paes_s390.c +++ b/arch/s390/crypto/paes_s390.c @@ -103,7 +103,7 @@ static inline void _free_kb_keybuf(struct key_blob *kb) { if (kb->key && kb->key != kb->keybuf && kb->keylen > sizeof(kb->keybuf)) { - kfree(kb->key); + kfree_sensitive(kb->key); kb->key = NULL; } } |