Make sure we take the ctx->lock in ossl_lib_ctx_generic_new()
authorMatt Caswell <matt@openssl.org>
Fri, 8 Jan 2021 13:22:59 +0000 (13:22 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 14 Jan 2021 17:30:46 +0000 (17:30 +0000)
commit2c40421440d260ddb97a807b064033f61ae3b2b3
tree7ae85d1721e8b0331e324b62963ef7bd8bd27cec
parentc25a1524aad3a2f3a5d74880d8016de31f59adc8
Make sure we take the ctx->lock in ossl_lib_ctx_generic_new()

The function ossl_lib_ctx_generic_new() modifies the exdata. This may
be simultaneously being modified by other threads and therefore we need
to make sure we take the lock before doing so.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13660)
crypto/context.c