Skip to content

Commit

Permalink
crypto: sun8i-ss - remove redundant memzero_explicit()
Browse files Browse the repository at this point in the history
Remove redundant memzero_explicit() in sun8i_ss_cipher() before calling
kfree_sensitive(). kfree_sensitive() will zero the memory with
memzero_explicit().

Fixes: 453431a ("mm, treewide: rename kzfree() to kfree_sensitive()")
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
evdenis authored and herbertx committed Sep 4, 2020
1 parent ede1328 commit f089ee5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ static int sun8i_ss_cipher(struct skcipher_request *areq)
offset = areq->cryptlen - ivsize;
if (rctx->op_dir & SS_DECRYPTION) {
memcpy(areq->iv, backup_iv, ivsize);
memzero_explicit(backup_iv, ivsize);
kfree_sensitive(backup_iv);
} else {
scatterwalk_map_and_copy(areq->iv, areq->dst, offset,
Expand Down

0 comments on commit f089ee5

Please sign in to comment.