From: Howard Chu Date: Fri, 19 Jul 2013 16:57:33 +0000 (-0700) Subject: Tweak reader_pid check X-Git-Tag: OPENLDAP_REL_ENG_2_4_36~32^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=de72c08660fca1597be0bb0b6536c122ae324645;p=openldap Tweak reader_pid check Check again after acquiring rmutex. Avoids potential issue with a duplicate pid coming in between initial check and rmutex. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 1e26d16ed4..4d686007ba 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -8092,11 +8092,13 @@ int mdb_reader_check(MDB_env *env, int *dead) if (mdb_pid_insert(pids, pid) == 0) { if (mdb_reader_pid(env, Pidcheck, pid)) { LOCK_MUTEX_R(env); - for (j=i; j