Remove locking in CRYPTO_secure_allocated()
authorPauli <pauli@openssl.org>
Tue, 6 Apr 2021 02:25:58 +0000 (12:25 +1000)
committerPauli <pauli@openssl.org>
Wed, 7 Apr 2021 13:28:07 +0000 (23:28 +1000)
commit44e82b813fbec93664fa355a65024a56f6eb82d7
tree514234beca8271c573002f415dad7bfe4eb2fcb0
parent0bc27f7203258f662a533574d0c6c55fb08166eb
Remove locking in CRYPTO_secure_allocated()

The check for being in secure memory is against the arena.  The arena is only
ever modified by sh_init() and sh_done() and in both cases, it is done without
locking.  Thus, it is safe for the CRYPTO_secure_allocated() to not lock.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14775)
crypto/mem_sec.c