]> git.ipfire.org Git - thirdparty/openwrt.git/blob
88a0bd15c06adb6717be7fe84e07bfb4bb3a0192
[thirdparty/openwrt.git] /
1 From 6e61ee1ca551292d8714c35c92a019c41db79e4e Mon Sep 17 00:00:00 2001
2 From: Thorsten Blum <thorsten.blum@toblux.com>
3 Date: Wed, 27 Mar 2024 23:25:09 +0100
4 Subject: [PATCH] crypto: jitter - Use kvfree_sensitive() to fix Coccinelle
5 warning
6
7 Replace memzero_explicit() and kvfree() with kvfree_sensitive() to fix
8 the following Coccinelle/coccicheck warning reported by
9 kfree_sensitive.cocci:
10
11 WARNING opportunity for kfree_sensitive/kvfree_sensitive
12
13 Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
14 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 ---
16 crypto/jitterentropy-kcapi.c | 3 +--
17 1 file changed, 1 insertion(+), 2 deletions(-)
18
19 --- a/crypto/jitterentropy-kcapi.c
20 +++ b/crypto/jitterentropy-kcapi.c
21 @@ -61,8 +61,7 @@ void *jent_kvzalloc(unsigned int len)
22
23 void jent_kvzfree(void *ptr, unsigned int len)
24 {
25 - memzero_explicit(ptr, len);
26 - kvfree(ptr);
27 + kvfree_sensitive(ptr, len);
28 }
29
30 void *jent_zalloc(unsigned int len)