]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10258 daemon/epoll: fix check for active socket
authorHoward Chu <hyc@openldap.org>
Thu, 18 Dec 2025 15:32:28 +0000 (15:32 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 13 Jan 2026 18:15:29 +0000 (18:15 +0000)
Lock sd_mutex before checking

servers/slapd/daemon.c

index 617a2f39465e06eca6394291f99431f40cf0f497..e7559ca2ffbf0473cd50ce3fb49848988621c7d1 100644 (file)
@@ -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
                                }
                        }