OSDN Git Service

crypto: hisilicon - Matching the dma address for dma_pool_free()
authorYunfeng Ye <yeyunfeng@huawei.com>
Sun, 15 Sep 2019 09:31:14 +0000 (17:31 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Sep 2019 12:53:09 +0000 (22:53 +1000)
commite00371af1d4ce73d527d8ee69fda2febaf5a42c2
tree52dabd522fb90c53f42bfccc089a6b1e9bcef4df
parent24fbf7bad888767bed952f540ac963bc57e47e15
crypto: hisilicon - Matching the dma address for dma_pool_free()

When dma_pool_zalloc() fail in sec_alloc_and_fill_hw_sgl(),
dma_pool_free() is invoked, but the parameters that sgl_current and
sgl_current->next_sgl is not match.

Using sec_free_hw_sgl() instead of the original free routine.

Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/sec/sec_algs.c