Skip to content
Permalink
Browse files

fix crash while switching to avx impl

Signed-off-by: Attila Fülöp <attila@fueloep.org>
  • Loading branch information
AttilaFueloep committed Jan 13, 2020
1 parent ed074a0 commit 0366890c59e80c77030476a75ca55f37de4de407
Showing with 10 additions and 0 deletions.
  1. +10 −0 module/icp/algs/modes/gcm.c
@@ -786,6 +786,16 @@ gcm_impl_get_ops()
size_t idx = (++cycle_impl_idx) % gcm_supp_impl_cnt;
ops = gcm_supp_impl[idx];
break;
#ifdef CAN_USE_GCM_ASM
case IMPL_AVX:
/*
* Make sure that we return a valid implementation while
* switching to the avx implementation since there still
* may be unfinished non-avx contexts around.
*/
ops = &gcm_generic_impl;
break;
#endif
default:
ASSERT3U(impl, <, gcm_supp_impl_cnt);
ASSERT3U(gcm_supp_impl_cnt, >, 0);

0 comments on commit 0366890

Please sign in to comment.
You can’t perform that action at this time.