Re: [PATCH] crypto: hisilicon/hpre - fix unmapping invalid dma address

2021-04-19 Thread Hui Tang
On 2021/4/16 19:26, Herbert Xu wrote: On Sat, Apr 10, 2021 at 05:49:17PM +0800, Hui Tang wrote: 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 whether it has been mapped before calling 'dma_free_coherent' or '

Re: [PATCH] crypto: hisilicon/hpre - fix unmapping invalid dma address

2021-04-16 Thread Herbert Xu
On Sat, Apr 10, 2021 at 05:49:17PM +0800, Hui Tang wrote: > 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 > whether it has been mapped before calling 'dma_free_coherent' or > 'dma_unmap_single'. > > An abnormal

[PATCH] crypto: hisilicon/hpre - fix unmapping invalid dma address

2021-04-10 Thread Hui Tang
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 whether it has been mapped before calling 'dma_free_coherent' or 'dma_unmap_single'. An abnormal case is as follows: hpre_curve25519_compute_value -> hpre_curv