diff --git a/src/slot.c b/src/slot.c index 6a936028..fae892cc 100644 --- a/src/slot.c +++ b/src/slot.c @@ -246,7 +246,7 @@ void p11prov_slot_fork_prepare(P11PROV_SLOTS_CTX *sctx) { int err; - err = pthread_rwlock_wrlock(&sctx->rwlock); + err = pthread_rwlock_rdlock(&sctx->rwlock); if (err != 0) { err = errno; P11PROV_debug("Failed to get slots lock (errno:%d)", err);