Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
d5cef9cd
Commit
d5cef9cd
authored
Aug 02, 2018
by
Mark Andrews
Browse files
fix lock order reversal
(cherry picked from commit
2bb4392b
)
parent
f8853681
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/isc/pk11.c
View file @
d5cef9cd
...
...
@@ -185,21 +185,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
);
...
...
@@ -239,7 +238,6 @@ pk11_initialize(isc_mem_t *mctx, const char *engine) {
}
#endif
#endif
/* PKCS11CRYPTO */
result
=
ISC_R_SUCCESS
;
unlock:
UNLOCK
(
&
sessionlock
);
return
(
result
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment