3.17-stable review patch. If anyone has any objections, please let me know.
------------------ From: Tadeusz Struk <[email protected]> commit 923a6e5e5f171317ac8bb462ac4b814fa7880d3c upstream. Do not attempt to dma map associated data if it is zero length. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- drivers/crypto/qat/qat_common/qat_algs.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/crypto/qat/qat_common/qat_algs.c +++ b/drivers/crypto/qat/qat_common/qat_algs.c @@ -650,6 +650,8 @@ static int qat_alg_sgl_to_bufl(struct qa 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, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

