1
0
Fork 0

crypto: ccree - fix backlog memory leak

commit 4df2ef25b3 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>
5.4-rM2-2.2.x-imx-squashed
Gilad Ben-Yossef 2019-11-27 10:49:08 +02:00 committed by Greg Kroah-Hartman
parent d2b1dcd543
commit 80c660892c
1 changed files with 1 additions and 0 deletions

View File

@ -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);