Use a write lock during ossl_provider_find()
authorMatt Caswell <matt@openssl.org>
Tue, 9 Nov 2021 14:32:14 +0000 (14:32 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 15 Nov 2021 14:22:41 +0000 (14:22 +0000)
commit256ec496890da13c700d5a21b069d519fe02c0b2
tree2a6cbee3eb479e776482596213882e5ff08d8b2f
parent5ab06d33e6b3be15c8784f1e1fd6c3d845b5cc3a
Use a write lock during ossl_provider_find()

A "find" operation on a stack can end up sorting the underlying stack. In
this case it is necessary to use a "write" lock to synchronise access to
the stack across multiple threads.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17018)
crypto/provider_core.c
doc/man3/DEFINE_STACK_OF.pod