[openssl/openssl] 6d1535: When we're just reading EX_CALLBACK data just get ...

Matt Caswell noreply at github.com
Tue May 30 16:39:05 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 6d15357aeb893c6e8b4c7a8188c18f4db54c0612
      https://github.com/openssl/openssl/commit/6d15357aeb893c6e8b4c7a8188c18f4db54c0612
  Author: Matt Caswell <matt at openssl.org>
  Date:   2023-05-30 (Tue, 30 May 2023)

  Changed paths:
    M crypto/ex_data.c

  Log Message:
  -----------
  When we're just reading EX_CALLBACK data just get a read lock

The crypto_ex_data code was always obtaining a write lock in all functions
regardless of whether we were only reading EX_CALLBACK data or actually
changing it. Changes to the EX_CALLBACK data are rare, with many reads so
we should change to a read lock where we can.

We hit this every time we create or free any object that can have ex_data
associated with it (e.g. BIOs, SSL, etc)

Partially fixes #20286

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20943)




More information about the openssl-commits mailing list