mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 20:02:06 -04:00
Merge branch 'fix-lock-order-reversal' into 'master'
fix lock order reversal See merge request isc-projects/bind9!590
This commit is contained in:
commit
3596bad5ce
2 changed files with 6 additions and 6 deletions
2
CHANGES
2
CHANGES
|
|
@ -1,3 +1,5 @@
|
|||
5012. [bug] Fix lock order reversal in pk11_initialize. [GL !590]
|
||||
|
||||
5011. [func] Remove support for unthreaded named. [GL #478]
|
||||
|
||||
5010. [func] New "validate-except" option specifies a list of
|
||||
|
|
|
|||
|
|
@ -182,21 +182,20 @@ pk11_mem_put(void *ptr, size_t size) {
|
|||
|
||||
isc_result_t
|
||||
pk11_initialize(isc_mem_t *mctx, const char *engine) {
|
||||
isc_result_t result;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
CK_RV rv;
|
||||
|
||||
RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
|
||||
|
||||
LOCK(&sessionlock);
|
||||
LOCK(&alloclock);
|
||||
if ((mctx != NULL) && (pk11_mctx == NULL) && (allocsize == 0))
|
||||
isc_mem_attach(mctx, &pk11_mctx);
|
||||
UNLOCK(&alloclock);
|
||||
if (initialized) {
|
||||
UNLOCK(&alloclock);
|
||||
return (ISC_R_SUCCESS);
|
||||
goto unlock;
|
||||
} else {
|
||||
LOCK(&sessionlock);
|
||||
initialized = true;
|
||||
UNLOCK(&alloclock);
|
||||
}
|
||||
|
||||
ISC_LIST_INIT(tokens);
|
||||
|
|
@ -220,7 +219,6 @@ pk11_initialize(isc_mem_t *mctx, const char *engine) {
|
|||
}
|
||||
|
||||
scan_slots();
|
||||
result = ISC_R_SUCCESS;
|
||||
unlock:
|
||||
UNLOCK(&sessionlock);
|
||||
return (result);
|
||||
|
|
|
|||
Loading…
Reference in a new issue