crypto/qat: fix DOCSIS crash
authorRebecca Troy <rebecca.troy@intel.com>
Wed, 29 Jun 2022 16:10:36 +0000 (16:10 +0000)
committerAkhil Goyal <gakhil@marvell.com>
Mon, 4 Jul 2022 17:22:56 +0000 (19:22 +0200)
commit03f0e3608d44d468b22ed17c30144d87edeb3ee9
tree3b595f7278b0024c8588cbe1566fce5672f19888
parentd5c247145c2c83f92919a1acc6040d287ccf7bfa
crypto/qat: fix DOCSIS crash

Currently if AES or DES algorithms fail for DOCSIS test suite,
a segmentation fault occurs when cryptodev_qat_autotest is ran.

This is due to a duplicate call of EVP_CIPHER_CTX_free for the
session context. Ctx is freed firstly in the bpi_cipher_ctx_init
function and then again at the end of qat_sym_session_configure_cipher
function.

This commit fixes this bug by removing the first instance
of EVP_CIPHER_CTX_free, leaving just the dedicated function in
the upper level to free the ctx.

Fixes: 98f060891615 ("crypto/qat: add symmetric session file")
Cc: stable@dpdk.org
Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
drivers/crypto/qat/qat_sym_session.c