DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] crypto/ipsec_mb: fix premature dereference
@ 2022-01-16 19:40 Piotr Bronowski
  2022-02-08 21:21 ` [EXT] " Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Piotr Bronowski @ 2022-01-16 19:40 UTC (permalink / raw)
  To: dev
  Cc: roy.fan.zhang, thomas, gakhil, ferruh.yigit, declan.doherty,
	Piotr Bronowski

This patch removes coverity defect CID 374380:
Null pointer dereferences  (REVERSE_INULL)

Coverity issue: CID 374380
Fixes: 918fd2f1466b ("crypto/ipsec_mb: move aesni_mb PMD")
Cc: roy.fan.zhang@intel.com

Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
---
 drivers/crypto/ipsec_mb/ipsec_mb_private.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.h b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
index 866722d6f4..e53101acf1 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.h
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
@@ -191,13 +191,13 @@ ipsec_mb_parse_xform(const struct rte_crypto_sym_xform *xform,
 			const struct rte_crypto_sym_xform **cipher_xform,
 			const struct rte_crypto_sym_xform **aead_xform)
 {
-	const struct rte_crypto_sym_xform *next = xform->next;
-
 	if (xform == NULL) {
 		*mode = IPSEC_MB_OP_NOT_SUPPORTED;
 		return -ENOTSUP;
 	}
 
+	const struct rte_crypto_sym_xform *next = xform->next;
+
 	if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) {
 		if (next == NULL) {
 			if (xform->cipher.op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) {
-- 
2.30.2

--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [EXT] [PATCH] crypto/ipsec_mb: fix premature dereference
  2022-01-16 19:40 [PATCH] crypto/ipsec_mb: fix premature dereference Piotr Bronowski
@ 2022-02-08 21:21 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2022-02-08 21:21 UTC (permalink / raw)
  To: Piotr Bronowski, dev; +Cc: roy.fan.zhang, thomas, ferruh.yigit, declan.doherty

> This patch removes coverity defect CID 374380:
> Null pointer dereferences  (REVERSE_INULL)
> 
> Coverity issue: CID 374380
> Fixes: 918fd2f1466b ("crypto/ipsec_mb: move aesni_mb PMD")
> Cc: roy.fan.zhang@intel.com
> 
> Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
> ---
Applied to dpdk-next-crypto

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-08 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-16 19:40 [PATCH] crypto/ipsec_mb: fix premature dereference Piotr Bronowski
2022-02-08 21:21 ` [EXT] " Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).