Skip to content

Commit

Permalink
fips: use tsan counter instead of tsan_add to increment
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from #21199)

(cherry picked from commit ff934cf)
  • Loading branch information
paulidale committed Jun 16, 2023
1 parent c69ba7b commit 41e5249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/fips/self_test.c
Expand Up @@ -460,7 +460,7 @@ int ossl_prov_is_running(void)
loclstate = tsan_load(&FIPS_state);
res = loclstate == FIPS_STATE_RUNNING || loclstate == FIPS_STATE_SELFTEST;
if (loclstate == FIPS_STATE_ERROR)
if (tsan_add(&rate_limit, 1) < FIPS_ERROR_REPORTING_RATE_LIMIT)
if (tsan_counter(&rate_limit) < FIPS_ERROR_REPORTING_RATE_LIMIT)
ERR_raise(ERR_LIB_PROV, PROV_R_FIPS_MODULE_IN_ERROR_STATE);
return res;
}

0 comments on commit 41e5249

Please sign in to comment.