Fix occasional assertion failure when storing properties
authorTomas Mraz <tomas@openssl.org>
Thu, 24 Nov 2022 17:48:10 +0000 (18:48 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 29 Nov 2022 07:21:34 +0000 (08:21 +0100)
commit92a25e24e6ec9735dea9ec645502cb075a5f8d24
tree480f7c3a97fd27f48bc2b85a407213daff15dc3a
parent055d029610712a281aed0c23ddd3c8f4dbf40f80
Fix occasional assertion failure when storing properties

Fixes #18631

The store lock does not prevent concurrent access to the
property cache, because there are multiple stores.

We drop the newly created entry and use the exisiting one
if there is one already.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19762)
crypto/property/defn_cache.c
crypto/property/property.c
crypto/property/property_local.h
test/property_test.c