[dpdk-stable] patch 'crypto/dpaa_sec: improve the error checking' has been queued to stable release 18.02.2
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Apr 30 16:41:28 CEST 2018
Hi,
FYI, your patch has been queued to stable release 18.02.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/02/18. So please
shout if anyone has objections.
Thanks.
Luca Boccassi
---
>From f3790c3be9824fac12d7f181368244653721a26e Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <sunil.kori at nxp.com>
Date: Thu, 5 Apr 2018 14:05:48 +0530
Subject: [PATCH] crypto/dpaa_sec: improve the error checking
[ upstream commit 22788c2c6a23d9c6bd6b9766065f0f3c2d203fb1 ]
Reported by NXP's internal coverity
Fixes: c3e85bdcc6e6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
Signed-off-by: Sunil Kumar Kori <sunil.kori at nxp.com>
Acked-by: Akhil Goyal <akhil.goyal at nxp.com>
---
drivers/crypto/dpaa_sec/dpaa_sec.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index c9bdd5640..c979c9ca6 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -388,7 +388,7 @@ static int
dpaa_sec_prep_cdb(dpaa_sec_session *ses)
{
struct alginfo alginfo_c = {0}, alginfo_a = {0}, alginfo = {0};
- uint32_t shared_desc_len = 0;
+ int32_t shared_desc_len = 0;
struct sec_cdb *cdb = &ses->cdb;
int err;
#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
@@ -530,6 +530,12 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses)
ses->digest_length, ses->dir);
}
}
+
+ if (shared_desc_len < 0) {
+ PMD_TX_LOG(ERR, "error in preparing command block\n");
+ return shared_desc_len;
+ }
+
cdb->sh_hdr.hi.field.idlen = shared_desc_len;
cdb->sh_hdr.hi.word = rte_cpu_to_be_32(cdb->sh_hdr.hi.word);
cdb->sh_hdr.lo.word = rte_cpu_to_be_32(cdb->sh_hdr.lo.word);
--
2.14.2
More information about the stable
mailing list