From: Pablo de Lara Date: Mon, 14 Aug 2017 00:45:21 +0000 (+0100) Subject: crypto/aesni_gcm: fix zero data operation X-Git-Tag: spdx-start~1441 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=41d2437f7c679dcbfc8b7697fde0b17765eea1ed;p=dpdk.git crypto/aesni_gcm: fix zero data operation When data length passed to the PMD was zero, the PMD was trying to get more data from a non-existent next segment. Fixes: 9c2a5775c028 ("crypto/aesni_gcm: migrate from MB library to ISA-L") Cc: stable@dpdk.org Signed-off-by: Pablo de Lara Reviewed-by: Kirill Rybalchenko --- diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index d9c91d0627..05c68fba9c 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -224,7 +224,7 @@ process_gcm_crypto_op(struct aesni_gcm_qp *qp, struct rte_crypto_op *op, RTE_ASSERT(m_src != NULL); - while (offset >= m_src->data_len) { + while (offset >= m_src->data_len && data_length != 0) { offset -= m_src->data_len; m_src = m_src->next;