crypto/ipsec_mb: fix of qp NULL check
PATCH 1/1 crypto/ipsec_mb: fix of qp NULL check
This patch fix the NULL pointer check when dereference qp and ring lookup.
Coverity issue: 381625
--- drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/crypto/ipsec_mb/ipsec_mb_ops.c +3 -2
@@ -141,12 +141,13 @@ ipsec_mb_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)struct ipsec_mb_qp *qp = dev->data->queue_pairs[qp_id];struct rte_ring *r =NULL ; -if (qp !=NULL ) +if (!qp)return 0 ;if (rte_eal_process_type () ==RTE_PROC_PRIMARY ) { r =rte_ring_lookup (qp->name); -rte_ring_free (r); +if (r) +rte_ring_free (r);#if IMB_VERSION (1 ,1 ,0 ) >IMB_VERSION_NUM if (qp->mb_mgr)
Signature · 1 line
2.17.1
Quoted 13 lines
-----Original Message-----
From: Ji, Kai <[email protected]>
Sent: Tuesday 1 November 2022 14:07
To: [email protected]
Cc: [email protected]; Ji, Kai <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; Ray Kinsella <[email protected]>; Power, Ciara <[email protected]>
Subject: [dpdk-dev v1]crypto/ipsec_mb: fix of qp NULL checkThis patch fix the NULL pointer check when dereference qp and ring lookup.
Quoted 8 lines
Coverity issue: 381625
Fixes c75542ae4200 ("crypto/ipsec_mb: introduce IPsec_mb framework")Signed-off-by Kai Ji <[email protected]>--- drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Akhil Goyal
AppliedQuoted 8 lines
Quoted 8 lines
Subject: [dpdk-dev v1]
crypto/ipsec_mb: fix of qp NULL checkThis patch fix the NULL pointer check when dereference qp and ring lookup.
Coverity issue: 381625
Fixes c75542ae4200 ("crypto/ipsec_mb: introduce IPsec_mb framework")
Quoted 6 lines
Quoted 4 lines
Signed-off-by Kai Ji <[email protected]>--- drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)Acked-by Ciara Power <[email protected]>
You should use devtools/check-git-log.sh
Applied to dpdk-next-crypto
Thanks.