DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] qat: fix null pointer dereferencing
@ 2016-05-18 16:12 Deepak Kumar Jain
  2016-06-07 14:42 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Deepak Kumar Jain @ 2016-05-18 16:12 UTC (permalink / raw)
  To: john.griffin, fiona.trahe, declan.doherty; +Cc: deepak.k.jain, dev

Fix null pointer dereferencing while
clearing session

Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")
Coverity ID 126586

Signed-off-by: Deepak kumar JAIN <deepak.k.jain@intel.com>
---
 drivers/crypto/qat/qat_crypto.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 495ea1c..a084692 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -276,14 +276,15 @@ void qat_crypto_sym_clear_session(struct rte_cryptodev *dev,
 		void *session)
 {
 	struct qat_session *sess = session;
-	phys_addr_t cd_paddr = sess->cd_paddr;
+	phys_addr_t cd_paddr;
 
 	PMD_INIT_FUNC_TRACE();
 	if (session) {
+		cd_paddr = sess->cd_paddr;
 		memset(sess, 0, qat_crypto_sym_get_session_private_size(dev));
-
 		sess->cd_paddr = cd_paddr;
-	}
+	} else
+		PMD_DRV_LOG(ERR, "NULL session");
 }
 
 static int
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH] qat: fix null pointer dereferencing
  2016-05-18 16:12 [dpdk-dev] [PATCH] qat: fix null pointer dereferencing Deepak Kumar Jain
@ 2016-06-07 14:42 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-06-07 14:42 UTC (permalink / raw)
  To: Deepak Kumar Jain; +Cc: dev, john.griffin, fiona.trahe, declan.doherty

2016-05-18 17:12, Deepak Kumar Jain:
> Fix null pointer dereferencing while
> clearing session
> 
> Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")
> Coverity ID 126586
> 
> Signed-off-by: Deepak kumar JAIN <deepak.k.jain@intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-06-07 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-18 16:12 [dpdk-dev] [PATCH] qat: fix null pointer dereferencing Deepak Kumar Jain
2016-06-07 14:42 ` Thomas Monjalon

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).