Commit 87883c89 authored by Bin Liu's avatar Bin Liu Committed by Greg Kroah-Hartman

crypto: omap-sham - fix memleak

commit 9dbc8a03 upstream.

Fixes: 8043bb1a ("crypto: omap-sham - convert driver logic to use sgs for data xmit")

The memory pages freed in omap_sham_finish_req() were less than those
allocated in omap_sham_copy_sgs().

Signed-off-by: default avatarBin Liu <>
Acked-by: default avatarTero Kristo <>
Signed-off-by: default avatarHerbert Xu <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent efc67e74
......@@ -1082,7 +1082,7 @@ static void omap_sham_finish_req(struct ahash_request *req, int err)
if (test_bit(FLAGS_SGS_COPIED, &dd->flags))
free_pages((unsigned long)sg_virt(ctx->sg),
get_order(ctx->sg->length + ctx->bufcnt));
if (test_bit(FLAGS_SGS_ALLOCED, &dd->flags))
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment