Commit c6ca4bc0 authored by Hui Tang's avatar Hui Tang Committed by Zheng Zengkai
Browse files

crypto: hisilicon/hpre - fix unmapping invalid dma address

mainline inclusion
from mainline-master
commit 0b0553b7
category: bugfix
bugzilla: 173981
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b0553b701f830d820ba9026e5799c24e400a4b5



----------------------------------------------------------------------

Currently, an invalid dma address may be unmapped when calling
'xx_data_clr_all' in error path, so check dma address of sqe in/out
if initialized before calling 'dma_free_coherent' or 'dma_unmap_single'.

Fixes: a9214b0b ("crypto: hisilicon - fix the check on dma address")
Signed-off-by: default avatarHui Tang <tanghui20@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarMingqiang Ling <lingmingqiang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent af1cd495
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment