mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
19b193ebc9
The current runtime check for robust mutexes in tdb_runtime_check_for_robust_mutexes() is not thread-safe. When called in a multi-threaded program where any another thread doesn't have SIGCHLD blocked, we may end up hung in sigsuspend() waiting for a SIGCHLD of a child procecss and the signal was delivered to another thread. Revert to the previous behaviour of waiting for the child instead of waiting for the SIGCHLD signal. Ensure the pid we wait for is not reset to -1 in a toctou race with the signal handler. Check whether waitpid() returns ECHILD which can happen if the signal handler is run by more then one thread in parallel (yes, this can happen) or if tdb_robust_mutex_wait_for_child() and the signal handler are racing. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12593 Pair-programmed-with: Stefan Metzmacher <metze@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> |
||
---|---|---|
.. | ||
addns | ||
afs | ||
async_req | ||
compression | ||
crypto | ||
dbwrap | ||
krb5_wrap | ||
ldb | ||
ldb-samba | ||
nss_wrapper | ||
pam_wrapper | ||
param | ||
pthreadpool | ||
replace | ||
resolv_wrapper | ||
smbconf | ||
socket | ||
socket_wrapper | ||
talloc | ||
tdb | ||
tdb_wrap | ||
tdr | ||
tevent | ||
texpect | ||
torture | ||
tsocket | ||
uid_wrapper | ||
util | ||
README | ||
wscript_build |
compression - Various compression algorithms (MSZIP, lzxpress) dnspython - Python module for working with DNS. nss_wrapper - Wrapper for the user and group NSS API allowing the use of other data sources. popt - Command-line option parsing library replace - Provides replacements for standard (POSIX, C99) functions not provided by the host platform. socket_wrapper - Wrapper library allowing TCP/IP traffic to be redirected over Unix domain sockets. subunit - Utilities and bindings for working with the Subunit test result reporting protocol. talloc - Hierarchical pool based memory allocator tdb - Simple but fast key/value database library, supporting multiple writers torture - Simple unit testing helper library