From 4a856f9593fb36fe7fdd2d6bcf79d9a7fada36ef Mon Sep 17 00:00:00 2001 From: Vladimir Medvedkin Date: Wed, 2 Dec 2020 17:56:12 +0000 Subject: 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 Change-Id: I65dd4e604b78fcb1cf0452d707f47f9785e6371d --- src/plugins/tlsopenssl/tls_async.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/tlsopenssl') 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); -- cgit 1.2.3-korg