patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Trahe, Fiona" <fiona.trahe@intel.com>,
	"Griffin, John" <john.griffin@intel.com>,
	"Jain, Deepak K" <deepak.k.jain@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] crypto/qat: fix segmentation fault in session create
Date: Thu, 30 Mar 2017 22:11:41 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D89747712B5D@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1490783506-18451-1-git-send-email-arkadiuszx.kusztal@intel.com>

CC'ing stable repo.

> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Wednesday, March 29, 2017 11:32 AM
> To: dev@dpdk.org
> Cc: Trahe, Fiona; De Lara Guarch, Pablo; Griffin, John; Jain, Deepak K;
> Kusztal, ArkadiuszX
> Subject: [PATCH] crypto/qat: fix segmentation fault in session create
> 
> This patch fixes segementation fault that may occur in case
> of wrong parameters being provided to the cryptographic
> session. Unused fields which would cause null dereference
> are removed.
> 
> Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")
> 
> This patchset depends on the following patches/patchsets:
> 
> "crypto/qat: adding docsisbpi mode support"
> (http://dpdk.org/dev/patchwork/patch/21121/)
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
>  drivers/crypto/qat/qat_crypto.c | 13 ++-----------
>  drivers/crypto/qat/qat_crypto.h |  3 ---
>  2 files changed, 2 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/crypto/qat/qat_crypto.c
> b/drivers/crypto/qat/qat_crypto.c
> index b851926..9310211 100644
> --- a/drivers/crypto/qat/qat_crypto.c
> +++ b/drivers/crypto/qat/qat_crypto.c
> @@ -739,11 +739,9 @@ qat_get_cipher_xform(struct
> rte_crypto_sym_xform *xform)
>  	return NULL;
>  }
>  void *
> -qat_crypto_sym_configure_session_cipher(struct rte_cryptodev *dev,
> +qat_crypto_sym_configure_session_cipher(struct rte_cryptodev *dev
> __rte_unused,
>  		struct rte_crypto_sym_xform *xform, void
> *session_private)
>  {
> -	struct qat_pmd_private *internals = dev->data->dev_private;
> -
>  	struct qat_session *session = session_private;
> 
>  	struct rte_crypto_cipher_xform *cipher_xform = NULL;
> @@ -884,7 +882,6 @@ qat_crypto_sym_configure_session_cipher(struct
> rte_cryptodev *dev,
>  		bpi_cipher_ctx_free(session->bpi_ctx);
>  		session->bpi_ctx = NULL;
>  	}
> -	rte_mempool_put(internals->sess_mp, session);
>  	return NULL;
>  }
> 
> @@ -893,8 +890,6 @@ void *
>  qat_crypto_sym_configure_session(struct rte_cryptodev *dev,
>  		struct rte_crypto_sym_xform *xform, void
> *session_private)
>  {
> -	struct qat_pmd_private *internals = dev->data->dev_private;
> -
>  	struct qat_session *session = session_private;
> 
>  	int qat_cmd_id;
> @@ -943,17 +938,15 @@ qat_crypto_sym_configure_session(struct
> rte_cryptodev *dev,
>  	return session;
> 
>  error_out:
> -	rte_mempool_put(internals->sess_mp, session);
>  	return NULL;
>  }
> 
>  struct qat_session *
> -qat_crypto_sym_configure_session_auth(struct rte_cryptodev *dev,
> +qat_crypto_sym_configure_session_auth(struct rte_cryptodev *dev
> __rte_unused,
>  				struct rte_crypto_sym_xform *xform,
>  				struct qat_session *session_private)
>  {
> 
> -	struct qat_pmd_private *internals = dev->data->dev_private;
>  	struct qat_session *session = session_private;
>  	struct rte_crypto_auth_xform *auth_xform = NULL;
>  	struct rte_crypto_cipher_xform *cipher_xform = NULL;
> @@ -1038,8 +1031,6 @@ qat_crypto_sym_configure_session_auth(struct
> rte_cryptodev *dev,
>  	return session;
> 
>  error_out:
> -	if (internals->sess_mp != NULL)
> -		rte_mempool_put(internals->sess_mp, session);
>  	return NULL;
>  }
> 
> diff --git a/drivers/crypto/qat/qat_crypto.h
> b/drivers/crypto/qat/qat_crypto.h
> index 78bb2bc..67fa0e1 100644
> --- a/drivers/crypto/qat/qat_crypto.h
> +++ b/drivers/crypto/qat/qat_crypto.h
> @@ -76,9 +76,6 @@ struct qat_qp {
> 
>  /** private data structure for each QAT device */
>  struct qat_pmd_private {
> -	char sess_mp_name[RTE_MEMPOOL_NAMESIZE];
> -	struct rte_mempool *sess_mp;
> -
>  	unsigned max_nb_queue_pairs;
>  	/**< Max number of queue pairs supported by device */
>  	unsigned max_nb_sessions;
> --
> 2.7.4

       reply	other threads:[~2017-03-30 22:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1490783506-18451-1-git-send-email-arkadiuszx.kusztal@intel.com>
2017-03-30 22:11 ` De Lara Guarch, Pablo [this message]
2017-05-12 15:41 [dpdk-stable] [PATCH] crypto/qat: fix aad capabilities for AES-GCM Arek Kusztal
2017-05-12 15:41 ` [dpdk-stable] [PATCH] crypto/qat: fix segmentation fault in session create Arek Kusztal

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=E115CCD9D858EF4F90C690B0DCB4D89747712B5D@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=john.griffin@intel.com \
    --cc=stable@dpdk.org \
    /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).