crypto/aesni_mb: fix invalid session error
Setting an invalid session in the crypto op results in SEGFAULT because
the JOB user_data was never set to the crypto op.
Fixes: 0f548b50a1
("crypto/aesni_mb: process crypto op on dequeue")
Cc: stable@dpdk.org
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
This commit is contained in:
parent
708a976b16
commit
6fcd9fdf37
@ -609,13 +609,16 @@ flush_mb_mgr(struct aesni_mb_qp *qp, struct rte_crypto_op **ops,
|
||||
}
|
||||
|
||||
static inline JOB_AES_HMAC *
|
||||
set_job_null_op(JOB_AES_HMAC *job)
|
||||
set_job_null_op(JOB_AES_HMAC *job, struct rte_crypto_op *op)
|
||||
{
|
||||
job->chain_order = HASH_CIPHER;
|
||||
job->cipher_mode = NULL_CIPHER;
|
||||
job->hash_alg = NULL_HASH;
|
||||
job->cipher_direction = DECRYPT;
|
||||
|
||||
/* Set user data to be crypto operation data struct */
|
||||
job->user_data = op;
|
||||
|
||||
return job;
|
||||
}
|
||||
|
||||
@ -654,7 +657,7 @@ aesni_mb_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
|
||||
retval = set_mb_job_params(job, qp, op, &digest_idx);
|
||||
if (unlikely(retval != 0)) {
|
||||
qp->stats.dequeue_err_count++;
|
||||
set_job_null_op(job);
|
||||
set_job_null_op(job, op);
|
||||
}
|
||||
|
||||
/* Submit job to multi-buffer for processing */
|
||||
|
Loading…
Reference in New Issue
Block a user