summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Medvedkin <vladimir.medvedkin@intel.com>2020-12-02 17:56:12 +0000
committerFlorin Coras <florin.coras@gmail.com>2020-12-03 18:07:46 +0000
commit4a856f9593fb36fe7fdd2d6bcf79d9a7fada36ef (patch)
tree97bb813a86a6ec949ef5ee68a1e17b533e3172b7
parent1d56ac423ce25da14dce69194ceebaeda6f47f18 (diff)
tls: fix passed argument in openssl plugin
Thread index used in qat_init_thread() is passed via a pointer to a variable located on a stack that does not exist when qat_init_thread is actually executed. Type: fix Fixes: f4a92f6a1c Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> Change-Id: I65dd4e604b78fcb1cf0452d707f47f9785e6371d
-rw-r--r--src/plugins/tlsopenssl/tls_async.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/tlsopenssl/tls_async.c b/src/plugins/tlsopenssl/tls_async.c
index fdfcf3a6c52..2988816a255 100644
--- a/src/plugins/tlsopenssl/tls_async.c
+++ b/src/plugins/tlsopenssl/tls_async.c
@@ -179,7 +179,7 @@ openssl_engine_register (char *engine_name, char *algorithm, int async)
if (engine_list[registered].thread_init)
session_send_rpc_evt_to_thread (i + 1,
engine_list[registered].thread_init,
- (void *) &i);
+ uword_to_pointer (i, void *));
}
om->start_polling = 1;
@@ -376,7 +376,7 @@ void
qat_init_thread (void *arg)
{
openssl_async_t *om = &openssl_async_main;
- int thread_index = *(int *) arg;
+ int thread_index = pointer_to_uword (arg);
ENGINE_ctrl_cmd (om->engine, "SET_INSTANCE_FOR_THREAD", thread_index,
NULL, NULL, 0);