mirror of https://github.com/openssl/openssl.git
fips: use tsan counter instead of tsan_add to increment
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/21199)
This commit is contained in:
parent
2525109f90
commit
ff934cfdc8
|
@ -460,7 +460,7 @@ int ossl_prov_is_running(void)
|
||||||
loclstate = tsan_load(&FIPS_state);
|
loclstate = tsan_load(&FIPS_state);
|
||||||
res = loclstate == FIPS_STATE_RUNNING || loclstate == FIPS_STATE_SELFTEST;
|
res = loclstate == FIPS_STATE_RUNNING || loclstate == FIPS_STATE_SELFTEST;
|
||||||
if (loclstate == FIPS_STATE_ERROR)
|
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);
|
ERR_raise(ERR_LIB_PROV, PROV_R_FIPS_MODULE_IN_ERROR_STATE);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue