mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
crypto: omap-sham - fix memleak
commit9dbc8a0328upstream. Fixes:8043bb1ae0("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(). Cc: stable@vger.kernel.org Signed-off-by: Bin Liu <b-liu@ti.com> Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ef2aa9f3a7
commit
20f4d771b3
@@ -1081,7 +1081,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));
|
||||
get_order(ctx->sg->length + ctx->bufcnt));
|
||||
|
||||
if (test_bit(FLAGS_SGS_ALLOCED, &dd->flags))
|
||||
kfree(ctx->sg);
|
||||
|
||||
Reference in New Issue
Block a user