From: Howard Chu Date: Thu, 18 Dec 2025 15:32:28 +0000 (+0000) Subject: ITS#10258 daemon/epoll: fix check for active socket X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=159cea0bba2ea0ed30c9e7c122e0855153903c01;p=thirdparty%2Fopenldap.git ITS#10258 daemon/epoll: fix check for active socket Lock sd_mutex before checking --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 617a2f3946..e7559ca2ff 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -3115,9 +3115,11 @@ loop: #ifdef HAVE_EPOLL /* Don't keep reporting the hangup */ + ldap_pvt_thread_mutex_lock( &slap_daemon[tid].sd_mutex ); if ( SLAP_SOCK_IS_ACTIVE( tid, fd )) { SLAP_EPOLL_SOCK_SET( tid, fd, EPOLLET ); } + ldap_pvt_thread_mutex_unlock( &slap_daemon[tid].sd_mutex ); #endif } }