diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2019-11-27 11:49:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-11 15:35:22 +0300 |
commit | 80c660892c24c867ee5b5bb367229ccfb2f2829b (patch) | |
tree | 48712e6b6a1ae0569c556ad318454c2f9cf2ef98 /drivers | |
parent | d2b1dcd5430f2fb32fd1278dd96a55692037d358 (diff) | |
download | linux-80c660892c24c867ee5b5bb367229ccfb2f2829b.tar.xz |
crypto: ccree - fix backlog memory leak
commit 4df2ef25b3b3618fd708ab484fe6239abd130fec upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/ccree/cc_request_mgr.c | 1 |
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 a947d5a2cf35..fa35fa78c000 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); |