mirror of
https://github.com/openssl/openssl.git
synced 2024-12-03 05:41:46 +08:00
f5a50c2a07
The primary DRBG may be shared across multiple threads and therefore we must use locking to access it. Previously we were enabling that locking lazily when we attempted to obtain one of the child DRBGs. Part of the process of enabling the lock, is to create the lock. But if we create the lock lazily then it is too late - we may race with other threads where each thread is independently attempting to enable the locking. This results in multiple locks being created - only one of which "sticks" and the rest are leaked. Instead we enable locking on the primary when we first create it. This is already locked and therefore we cannot race. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13660) |
||
---|---|---|
.. | ||
build.info | ||
prov_seed.c | ||
rand_deprecated.c | ||
rand_egd.c | ||
rand_err.c | ||
rand_lib.c | ||
rand_local.h | ||
rand_meth.c | ||
rand_pool.c | ||
randfile.c |