While running the IPsec unit tests the following segmentation fault is occurring:
Thread 1 "test" received signal SIGSEGV, Segmentation fault. 0x0000000000bf3b50 in qat_sym_process_response ( op=0x5355280 <unittest_params+512>, resp=0x100455100 "") at /root/dpdk/drivers/crypto/qat/qat_sym.h:161 161 if (sess->bpi_ctx) Fixes: 91614c73b67c ("crypto/qat: make response process function inline") Signed-off-by: Bernard Iremonger <bernard.iremon...@intel.com> --- drivers/crypto/qat/qat_sym.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h index bc6426c..685c6c0 100644 --- a/drivers/crypto/qat/qat_sym.h +++ b/drivers/crypto/qat/qat_sym.h @@ -157,10 +157,12 @@ qat_sym_process_response(void **op, uint8_t *resp) rx_op->sym->session, cryptodev_qat_driver_id); - - if (sess->bpi_ctx) + if (sess == NULL) + rx_op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED; + else if (sess->bpi_ctx) { qat_bpicipher_postprocess(sess, rx_op); - rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; + rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; + } } *op = (void *)rx_op; } -- 2.7.4