Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: remove kzfree() compatibility definition

Commit 453431a54934 ("mm, treewide: rename kzfree() to
kfree_sensitive()") renamed kzfree() to kfree_sensitive(),
but it left a compatibility definition of kzfree() to avoid
being too disruptive.

Since then a few more instances of kzfree() have slipped in.

Just get rid of them and remove the compatibility definition
once and for all.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Eric Biggers and committed by
Linus Torvalds
23224e45 0f7f635b

+6 -8
+1 -1
drivers/staging/rtl8192e/rtllib_crypt_tkip.c
··· 100 100 crypto_free_shash(_priv->tx_tfm_michael); 101 101 crypto_free_shash(_priv->rx_tfm_michael); 102 102 } 103 - kzfree(priv); 103 + kfree_sensitive(priv); 104 104 } 105 105 106 106
+1 -1
drivers/staging/rtl8192e/rtllib_crypt_wep.c
··· 49 49 50 50 static void prism2_wep_deinit(void *priv) 51 51 { 52 - kzfree(priv); 52 + kfree_sensitive(priv); 53 53 } 54 54 55 55 /* Perform WEP encryption on given skb that has at least 4 bytes of headroom
+1 -1
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
··· 107 107 crypto_free_shash(_priv->tx_tfm_michael); 108 108 crypto_free_shash(_priv->rx_tfm_michael); 109 109 } 110 - kzfree(priv); 110 + kfree_sensitive(priv); 111 111 } 112 112 113 113
+1 -1
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
··· 54 54 55 55 static void prism2_wep_deinit(void *priv) 56 56 { 57 - kzfree(priv); 57 + kfree_sensitive(priv); 58 58 } 59 59 60 60 /* Perform WEP encryption on given skb that has at least 4 bytes of headroom
-2
include/linux/slab.h
··· 187 187 size_t __ksize(const void *); 188 188 size_t ksize(const void *); 189 189 190 - #define kzfree(x) kfree_sensitive(x) /* For backward compatibility */ 191 - 192 190 #ifdef CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR 193 191 void __check_heap_object(const void *ptr, unsigned long n, struct page *page, 194 192 bool to_user);
+2 -2
net/tipc/crypto.c
··· 418 418 kfree(head); 419 419 } 420 420 free_percpu(aead->tfm_entry); 421 - kzfree(aead->key); 421 + kfree_sensitive(aead->key); 422 422 kfree(aead); 423 423 } 424 424 ··· 2452 2452 tipc_crypto_key_init(tx, skey, PER_NODE_KEY, false); 2453 2453 if (likely(rc > 0)) 2454 2454 rc = tipc_crypto_key_distr(tx, rc, NULL); 2455 - kzfree(skey); 2455 + kfree_sensitive(skey); 2456 2456 } 2457 2457 2458 2458 if (unlikely(rc))