1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source3/lib
Volker Lendecke e84521dc44 lib: Fix a pthreadpool race condition
Yes, there is one.... I've seen two flaky builds on sn-devel with
pthreadpool after the coverity checks went in. They were in the

		ret = pthread_mutex_unlock(&pool->mutex);
		assert(ret == 0);

in pthreadpool_parent() and pthreadpool_child(). No idea what that was,
I could not really reproduce that. A build attempt on FreeBSD also gave
an erratic error, this time it was an EINVAL in

		ret = pthread_mutex_lock(&pool->mutex);
		assert(ret == 0);

pthreadpool_parent(). EINVAL means that the mutex is not a proper
mutex. What happened: Someone (a detached thread) does the
pthreadpool_free behind our back, while we are in pthreadpool_parent,
preparing the fork. Unfortunately the mutex was already destroyed before
we came to lock it.

The fix is simple: Remove the obsolete struct pthreadpool from the
linked list before the mutex is destroyed.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-10-17 22:34:20 +02:00
..
ABI
dbwrap dbwrap_watch: Improve a debug message 2016-10-03 19:49:19 +02:00
eventlog lib: Remove tdb_compat 2015-03-17 11:30:52 +01:00
netapi werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source3/lib/netapi/ 2016-09-28 00:04:34 +02:00
pthreadpool lib: Fix a pthreadpool race condition 2016-10-17 22:34:20 +02:00
smbconf werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source3/lib/smbconf/smbconf_reg.c 2016-09-28 00:04:17 +02:00
access.c Update mailing list references to point at lists.samba.org 2015-02-10 07:08:28 +01:00
addrchange.c s3:lib/addrchange: make use of tdgram_* in addrchange_*() 2015-06-12 17:08:17 +02:00
addrchange.h
adt_tree.c
audit.c Change all uses of uint32/16/8 in proto.h to uint32_t/16_t/8_t. 2015-04-29 23:42:20 +02:00
avahi.c
background.c s3: Move call to prctl_set_comment to reinit_after_fork 2015-09-24 08:00:16 +02:00
background.h
cbuf.c
cbuf.h s3-lib: Fix format-nonliteral warning 2016-08-24 01:33:50 +02:00
charcnv.c Change all uses of uint32/16/8 in proto.h to uint32_t/16_t/8_t. 2015-04-29 23:42:20 +02:00
cleanupdb.c s3/lib: add smbd_cleanupd.tdb 2016-07-28 05:00:18 +02:00
cleanupdb.h s3/lib: add smbd_cleanupd.tdb 2016-07-28 05:00:18 +02:00
cluster_support.c lib: Move lp_ctdbd_socket() to cluster_support.c 2015-10-03 00:01:11 +02:00
cluster_support.h lib: Move lp_ctdbd_socket() to cluster_support.c 2015-10-03 00:01:11 +02:00
conn_tdb.c smbstatus: show signing state of sessions and tcons 2016-01-22 07:52:21 +01:00
conn_tdb.h smbstatus: show signing state of sessions and tcons 2016-01-22 07:52:21 +01:00
ctdb_dummy.c s3-messaging/ctdb: add messaging_ctdbd_reinit() 2016-07-11 20:05:06 +02:00
ctdbd_conn.c ctdb-conn: add missing variable initialization 2016-10-10 22:35:37 +02:00
dmallocmsg.c
dumpcore.c source3: Honor the core soft limit of the OS. 2016-03-05 00:39:48 +01:00
errmap_unix.c s3:lib/errmap_unix: map EOVERFLOW to NT_STATUS_ALLOTTED_SPACE_EXCEEDED 2015-12-21 23:21:17 +01:00
file_id.c lib: Apply some const to pull_file_id_24 2013-09-06 13:40:05 +02:00
file_id.h lib: Apply some const to pull_file_id_24 2013-09-06 13:40:05 +02:00
filename_util.c s3: smbd: Remove many common uses of lp_posix_pathnames(). 2016-03-24 22:57:16 +01:00
fncall.c lib: Use pthreadpool_pipe instead of pthreadpool 2016-08-24 01:33:48 +02:00
fstring.c
g_lock.c lib: Convert g_lock to new dbwrap_watch 2016-07-15 16:56:13 +02:00
gencache.c gencache: Bail out of stabilize if we can not get the allrecord lock 2016-09-20 04:09:33 +02:00
gencache.h lib: Remove ntstatus.h from gencache.h 2015-12-16 04:14:20 +01:00
id_cache.c lib/util: move memcache.[ch] to the toplevel 'samba-util' library 2014-07-18 15:43:33 +02:00
id_cache.h
idmap_cache.c s3:idmap_cache: remove unused idmap_cache_set_sid2[u|g]id() 2014-12-03 06:44:29 +01:00
idmap_cache.h s3:idmap_cache: remove unused idmap_cache_set_sid2[u|g]id() 2014-12-03 06:44:29 +01:00
interface.c s3:lib: extend interpret_interface() to optionally read speed, caps, and index from config 2016-01-26 07:33:16 +01:00
ldap_debug_handler.c
ldap_escape.c
lsa.c lib: Fix talloc hierarchy in init_lsa_ref_domain_list 2015-02-27 22:53:06 +01:00
messages_ctdbd.c s3-messaging/ctdb: add messaging_ctdbd_reinit() 2016-07-11 20:05:06 +02:00
messages_dgm_ref.c messaging: Add an indirection for messaging_dgm_register_tevent_context 2016-10-05 11:47:17 +02:00
messages_dgm_ref.h messages_dgm_ref: Pass receiving "ev" to recv_cb 2016-10-05 00:06:22 +02:00
messages_dgm.c messaging: Fix CID 1373622 Extra high-order bits 2016-10-14 21:45:08 +02:00
messages_dgm.h messaging: Add an indirection for messaging_dgm_register_tevent_context 2016-10-05 11:47:17 +02:00
messages_util.c lib: Introduce SERVER_ID_BUF_LENGTH 2016-03-06 16:21:12 +01:00
messages_util.h messaging: Define a binary format for message headers 2015-02-13 23:32:07 +01:00
messages.c messaging: Add an indirection for messaging_dgm_register_tevent_context 2016-10-05 11:47:17 +02:00
ms_fnmatch.c
namearray.c
popt_common.c s3: fix encryption help messages 2015-12-22 02:22:50 +01:00
privileges.c Fix various spelling errors 2015-11-06 13:43:45 +01:00
privileges.h
readdir_attr.h s3:vfs: add SMB_VFS_READDIR_ATTR() 2014-12-04 22:11:07 +01:00
recvfile.c lib: Move sys_rw* to lib/util 2015-10-13 01:23:07 +02:00
sendfile.c Remove a few #ifdef EWOULDBLOCk 2014-09-18 20:36:11 +02:00
server_contexts.c s3: server: s3_tevent_context_init() -> samba_tevent_context_init() 2016-09-24 19:52:08 +02:00
server_id_db_util.c lib: Fix a signed/unsigned mixup 2016-07-16 00:17:03 +02:00
server_id_db_util.h lib: Add server_id_db_set_exclusive 2015-07-07 23:51:23 +02:00
server_id_watch.c lib: Add server_id_watch_send 2016-07-15 16:56:13 +02:00
server_id_watch.h lib: Add server_id_watch_send 2016-07-15 16:56:13 +02:00
server_mutex.c server_mutex: don't leak lock_path onto talloc tos 2014-11-03 23:46:05 +01:00
server_prefork_util.c
server_prefork_util.h
server_prefork.c lib: Remove sys_waitpid 2016-02-23 22:03:16 +01:00
server_prefork.h
serverid.c lib: Move "message_send_all" to serverid.c 2016-07-28 05:00:19 +02:00
sessionid_tdb.c smbstatus: show signing state of sessions and tcons 2016-01-22 07:52:21 +01:00
sharesec.c sharesec: Remove error message for unmarshall_sec_desc failure 2015-07-06 20:19:12 +02:00
smbd_shim.c s3-smbd_shim: Add become_authenticated_pipe_user(). 2013-10-29 15:52:58 +01:00
smbd_shim.h s3-smbd_shim: Add become_authenticated_pipe_user(). 2013-10-29 15:52:58 +01:00
smbldap.c s3: lib: ldap: Use struct sockaddr_storage to cope with IPv6. 2016-05-29 05:37:12 +02:00
smbrun.c Update smbrun to allow for settings environment variables. 2016-10-13 04:26:26 +02:00
sock_exec.c
srprs.c s3:lib: fix/simplify srprs_hex() 2014-11-25 07:25:44 +01:00
srprs.h
substitute_generic.c
substitute.c lib: Fix CID 1373623 Dereference after null check 2016-10-12 20:54:08 +02:00
sys_popen.c lib: Extract sys_popen() 2016-02-23 22:03:16 +01:00
sys_popen.h lib: Extract sys_popen() 2016-02-23 22:03:16 +01:00
sysacls.c lib: Fix indentation 2015-05-06 04:14:14 +02:00
sysquotas_4A.c sys-quotas: do not fail if user has no quota 2016-03-31 20:30:10 +02:00
sysquotas_4B.c s3-quotas: fix sysquotas_4B quota fetching for BSD 2016-05-23 23:28:12 +02:00
sysquotas_linux.c s3-sysquotas-linux: do not check for EDQUOT 2016-06-01 00:57:32 +02:00
sysquotas_nfs.c nfs-quota: do not fail on ECONNREFUSED 2016-03-31 20:30:11 +02:00
sysquotas_xfs.c xfs quotas - fix case of no quota for user 2016-04-29 05:39:14 +02:00
sysquotas.c s3-sysquotas: correctly restore path when finding mount point 2016-10-08 05:22:25 +02:00
system_smbd.c lib: Avoid a malloc/realloc in getgroups_unix_user 2015-03-11 16:11:08 +01:00
system.c lib: Extract sys_popen() 2016-02-23 22:03:16 +01:00
talloc_dict.c s3:talloc_dict: fix a SIGBUS when dereferencing unaligned pointers 2015-11-30 22:31:16 +01:00
tallocmsg.c lib: Use talloc_report_str 2015-02-13 23:32:07 +01:00
tdb_validate.c lib: Remove sys_waitpid 2016-02-23 22:03:16 +01:00
tdb_validate.h lib: Remove tdb_compat 2015-03-17 11:30:52 +01:00
tevent_barrier.c Use tevent_req_simple_recv_unix in a few places 2014-11-10 06:09:04 +01:00
tevent_barrier.h
tevent_wait.c s3:tevent_wait: simplify the code by using tevent_req_defer_callback() 2015-05-19 16:37:52 +02:00
tevent_wait.h
time.c lib: Align nt_time_to_unix_timespec with unix_timespec_to_nt_time 2014-06-30 22:28:14 +02:00
tldap_gensec_bind.c s3: tldap: Make tldap_gensec_bind_send()/tldap_gensec_bind_recv() static. 2016-06-28 11:19:33 +02:00
tldap_gensec_bind.h s3: tldap: Make tldap_gensec_bind_send()/tldap_gensec_bind_recv() static. 2016-06-28 11:19:33 +02:00
tldap_util.c lib: Give base64.c its own .h 2016-05-04 01:28:23 +02:00
tldap.c tldap: Add tldap_get/set_stream 2016-04-15 15:32:11 +02:00
username.c lib/util: move memcache.[ch] to the toplevel 'samba-util' library 2014-07-18 15:43:33 +02:00
util_builtin.c Change all uses of uint32/16/8 in proto.h to uint32_t/16_t/8_t. 2015-04-29 23:42:20 +02:00
util_cluster.c lib: Make ctdbd_probe return 0/errno 2015-10-07 23:54:06 +02:00
util_cluster.h s3: add cluster_probe_ok() in a new module util_cluster. 2013-10-17 23:21:53 +02:00
util_cmdline.c s3-lib: Parse WORKGROUP\username in set_cmdline_auth_info_username() 2016-09-25 09:05:27 +02:00
util_ea.c dlist: remove unneeded type argument from DLIST_ADD_END() 2016-02-06 21:48:17 +01:00
util_ea.h s3:lib: Factor read_ea_list_entry() and read_nttrans_ea_list() out so they can be used by the SMB2 client code. 2013-08-15 09:07:06 +02:00
util_event.c s3: events. Move events.c to util_event.c 2016-09-24 19:52:08 +02:00
util_file.c lib: Remove "includes.h" from util_file.c 2016-02-23 22:03:17 +01:00
util_file.h lib: Remove "includes.h" from util_file.c 2016-02-23 22:03:17 +01:00
util_malloc.c
util_names.c s3:lib: add braces around if-block in my_sam_name() 2016-01-26 03:19:18 +01:00
util_nscd.c
util_nttoken.c
util_path.c lib: Separate out xx_path() & callers 2015-12-14 20:23:13 +01:00
util_path.h lib: Separate out xx_path() & callers 2015-12-14 20:23:13 +01:00
util_procid.c lib: Move some procid functions out of util.c 2015-11-09 07:53:18 +01:00
util_procid.h lib: Move some procid functions out of util.c 2015-11-09 07:53:18 +01:00
util_sd.c util_sd: Also accept hex input for ALLOW/DENIED 2016-02-20 00:46:29 +01:00
util_sec.c s3-lib: Get the real initial uid for selftest 2015-11-05 09:23:15 +01:00
util_sid_passdb.c s3:util_sid: donate an empty line. 2015-03-16 20:26:50 +01:00
util_sid_passdb.h
util_sid.c s3-util: skip S-1-18 sids in token generaion in sid_array_from_info3(). 2016-01-16 01:24:04 +01:00
util_sock.c Fix various spelling errors 2015-11-06 13:43:45 +01:00
util_specialsids.c s3-util: add helper functions to deal with the S-1-18 domain. 2016-01-15 22:19:07 +01:00
util_str.c s3-lib: Remove unused function sprintf_append 2016-08-24 01:33:50 +02:00
util_tdb.c s3-lib: Fix format-nonliteral warning 2016-08-24 01:33:50 +02:00
util_transfer_file.c lib: Move sys_rw* to lib/util 2015-10-13 01:23:07 +02:00
util_tsock.c lib: Introduce util_tsock.h 2016-01-10 22:24:17 +01:00
util_tsock.h lib: Introduce util_tsock.h 2016-01-10 22:24:17 +01:00
util_unixsids.c
util_wellknown.c s3:lib: validate domain name in lookup_wellknown_name() 2015-10-15 19:56:14 +02:00
util.c s3-lib: Do not set an empty string in split_domain_user() 2016-09-25 12:56:17 +02:00
version_test.c
version.c
winbind_util.c Convert all uint32/16/8 to _t in source3/lib. 2015-05-13 19:11:23 +02:00
winbind_util.h Convert all uint32/16/8 to _t in source3/lib. 2015-05-13 19:11:23 +02:00
wins_srv.c lib: Add a "mem_ctx" arg to gencache_get (unused so far) 2013-09-05 09:16:23 -07:00
xattr_tdb.c
xattr_tdb.h