From: Gilad Ben-Yossef Date: Wed, 27 Nov 2019 08:49:08 +0000 (+0200) Subject: crypto: ccree - fix backlog memory leak X-Git-Tag: v5.10.7~3034^2~228 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4df2ef25b3b3618fd708ab484fe6239abd130fec;p=platform%2Fkernel%2Flinux-rpi.git 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 Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/ccree/cc_request_mgr.c b/drivers/crypto/ccree/cc_request_mgr.c index 3ed3164..a5606dc 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);