drivers/crypto: fix session-less mode
authorJunxiao Shi <git@mail1.yoursunny.com>
Mon, 27 Jan 2020 18:32:11 +0000 (11:32 -0700)
committerAkhil Goyal <akhil.goyal@nxp.com>
Thu, 13 Feb 2020 11:41:21 +0000 (12:41 +0100)
commita0c2b3d8ee501b90eb11c2a82da0aaca19362bd3
tree76023114292f83bce757ba38f005cfd4f153eeba
parent2a9f232ce60ec3837017f27646aeba3095192a0b
drivers/crypto: fix session-less mode

When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode
for symmetric crypto operation (e.g. SHA256 hash), the driver prints
error message:

    CRYPTODEV: set_sym_session_private_data() line 489:
               Set private data for driver 0 not allowed

Then, AESNI-MB driver segfaults in post_process_mb_job().

Bugzilla ID: 377
Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions")
Fixes: c68d7aa354 ("crypto/aesni_mb: use architecture independent macros")
Cc: stable@dpdk.org
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
drivers/crypto/openssl/rte_openssl_pmd.c