From: Deepak Kumar Jain <deepak.k.jain@intel.com>
To: john.griffin@intel.com, fiona.trahe@intel.com, declan.doherty@intel.com
Cc: deepak.k.jain@intel.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH] qat: fix null pointer dereferencing
Date: Wed, 18 May 2016 17:12:38 +0100 [thread overview]
Message-ID: <1463587958-154335-1-git-send-email-deepak.k.jain@intel.com> (raw)
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
next reply other threads:[~2016-05-18 16:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-18 16:12 Deepak Kumar Jain [this message]
2016-06-07 14:42 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463587958-154335-1-git-send-email-deepak.k.jain@intel.com \
--to=deepak.k.jain@intel.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=fiona.trahe@intel.com \
--cc=john.griffin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).