quic: update to structure based atomics
authorPauli <pauli@openssl.org>
Wed, 21 Jun 2023 23:40:03 +0000 (09:40 +1000)
committerPauli <pauli@openssl.org>
Sat, 1 Jul 2023 11:18:25 +0000 (21:18 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21260)

ssl/quic/quic_impl.c

index b1e9be774b248178e97dba6485ae85ce0e3f3e31..3454b35ef73d18cc756c655ccb53e7e10bd521e4 100644 (file)
@@ -581,7 +581,7 @@ static void qc_set_default_xso_keep_ref(QUIC_CONNECTION *qc, QUIC_XSO *xso,
              */
             assert(*old_xso == NULL);
 
-            CRYPTO_DOWN_REF(&qc->ssl.references, &refs, &qc->ssl.lock);
+            CRYPTO_DOWN_REF(&qc->ssl.references, &refs);
             assert(refs > 0);
         }
     }
@@ -2311,7 +2311,7 @@ int ossl_quic_attach_stream(SSL *conn, SSL *stream)
      * It is a caller error for the XSO being attached as a default XSO to have
      * more than one ref.
      */
-    if (!CRYPTO_GET_REF(&xso->ssl.references, &nref, &xso->ssl.lock)) {
+    if (!CRYPTO_GET_REF(&xso->ssl.references, &nref)) {
         quic_unlock(ctx.qc);
         return QUIC_RAISE_NON_NORMAL_ERROR(&ctx, ERR_R_INTERNAL_ERROR,
                                            "ref");