DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/aesni_mb: check if session is valid
@ 2020-04-20 11:05 Pablo de Lara
  2020-05-09 21:38 ` Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo de Lara @ 2020-04-20 11:05 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev, Pablo de Lara

Check if session is valid after getting operation
out of the internal IPSec MB manager, in case the
session has been freed while the operation was still
inside the manager.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index a1d59e8..4bfc752 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -1178,6 +1178,10 @@ post_process_mb_job(struct aesni_mb_qp *qp, JOB_AES_HMAC *job)
 	struct aesni_mb_session *sess = get_sym_session_private_data(
 							op->sym->session,
 							cryptodev_driver_id);
+	if (unlikely(sess == NULL)) {
+		op->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
+		return op;
+	}
 
 	if (likely(op->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED)) {
 		switch (job->status) {
-- 
2.7.5


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

* Re: [dpdk-dev] [PATCH] crypto/aesni_mb: check if session is valid
  2020-04-20 11:05 [dpdk-dev] [PATCH] crypto/aesni_mb: check if session is valid Pablo de Lara
@ 2020-05-09 21:38 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2020-05-09 21:38 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty; +Cc: dev

> 
> Check if session is valid after getting operation
> out of the internal IPSec MB manager, in case the
> session has been freed while the operation was still
> inside the manager.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---

Applied to dpdk-next-crypto

Thanks.

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

end of thread, other threads:[~2020-05-09 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20 11:05 [dpdk-dev] [PATCH] crypto/aesni_mb: check if session is valid Pablo de Lara
2020-05-09 21:38 ` 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).