[dpdk-stable] patch 'crypto/dpaa2_sec: add check for segmented buffer' has been queued to stable release 17.08.1

Yuanhan Liu yliu at fridaylinux.org
Tue Nov 21 14:17:52 CET 2017


Hi,

FYI, your patch has been queued to stable release 17.08.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From f1ff0980416e1cbf447e6ae981a167c44b907423 Mon Sep 17 00:00:00 2001
From: Alok Makhariya <alok.makhariya at nxp.com>
Date: Fri, 13 Oct 2017 21:08:54 +0530
Subject: [PATCH] crypto/dpaa2_sec: add check for segmented buffer

[ upstream commit 9b0b95a48c0e171454cfca4231cecac7d470a75c ]

The code would crash for segmented buffer if no check.

Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation")

Signed-off-by: Alok Makhariya <alok.makhariya at nxp.com>
Acked-by: Akhil Goyal <akhil.goyal at nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 61c1eae..28d8af5 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -548,7 +548,13 @@ build_sec_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
 	int ret = -1;
 
 	PMD_INIT_FUNC_TRACE();
-
+	/*
+	 * Segmented buffer is not supported.
+	 */
+	if (!rte_pktmbuf_is_contiguous(op->sym->m_src)) {
+		op->status = RTE_CRYPTO_OP_STATUS_ERROR;
+		return -ENOTSUP;
+	}
 	switch (sess->ctxt_type) {
 	case DPAA2_SEC_CIPHER:
 		ret = build_cipher_fd(sess, op, fd, bpid);
-- 
2.7.4



More information about the stable mailing list