mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
crypto: qat - Prevent dma mapping zero length assoc data
Do not attempt to dma map associated data if it is zero length. Cc: [email protected] Signed-off-by: Tadeusz Struk <[email protected]> Tested-by: Nikolay Aleksandrov <[email protected]> Reviewed-by: Prarit Bhargava <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
f114040e3e
commit
923a6e5e5f
1 changed files with 2 additions and 0 deletions
|
|
@ -605,6 +605,8 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,
|
|||
goto err;
|
||||
|
||||
for_each_sg(assoc, sg, assoc_n, i) {
|
||||
if (!sg->length)
|
||||
continue;
|
||||
bufl->bufers[bufs].addr = dma_map_single(dev,
|
||||
sg_virt(sg),
|
||||
sg->length,
|
||||
|
|
|
|||
Loading…
Reference in a new issue