summaryrefslogtreecommitdiff
path: root/drivers/crypto/ccree/cc_request_mgr.c
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2019-11-27 11:49:08 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-12-11 11:36:55 +0300
commit4df2ef25b3b3618fd708ab484fe6239abd130fec (patch)
treef9ab35e714a4165a22936055250bee5ef82fc5e1 /drivers/crypto/ccree/cc_request_mgr.c
parent7c06603e20e999851978a7e1dcbcac026b467498 (diff)
downloadlinux-4df2ef25b3b3618fd708ab484fe6239abd130fec.tar.xz
crypto: ccree - fix backlog memory leak
Fix brown paper bag bug of not releasing backlog list item buffer when backlog was consumed causing a memory leak when backlog is used. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccree/cc_request_mgr.c')
-rw-r--r--drivers/crypto/ccree/cc_request_mgr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/ccree/cc_request_mgr.c b/drivers/crypto/ccree/cc_request_mgr.c
index 3ed3164820eb..a5606dc04b06 100644
--- a/drivers/crypto/ccree/cc_request_mgr.c
+++ b/drivers/crypto/ccree/cc_request_mgr.c
@@ -404,6 +404,7 @@ static void cc_proc_backlog(struct cc_drvdata *drvdata)
spin_lock(&mgr->bl_lock);
list_del(&bli->list);
--mgr->bl_len;
+ kfree(bli);
}
spin_unlock(&mgr->bl_lock);