mirror of git://sourceware.org/git/glibc.git
_res_hconf.initialized was not suitable for use in a multi-threaded environment due to the lack of atomics and memory barriers. Use of it was also unnecessary because _res_hconf_init did the right thing by using __libc_once. This patch fixes the glibc-internal uses by just calling _res_hconf_init unconditionally, and switches to a release MO atomic store for _res_hconf.initialized to fix the glibc side of the synchronization problem (which will maintain backward compatibility, but cannot fix the lack of acquire MO on any glibc-external loads). [BZ #20477] * resolv/res_hconf.c (do_init): Use atomic access. * resolv/res_hconf.h: Add comments. * nscd/aicache.c (addhstaiX): Call _res_hconf_init unconditionally. * nss/getXXbyYY_r.c (REENTRANT_NAME): Likewise. * sysdeps/posix/getaddrinfo.c (gaih_inet): Likewise. |
||
|---|---|---|
| .. | ||
| Depend | ||
| Makefile | ||
| aicache.c | ||
| cache.c | ||
| connections.c | ||
| dbg_log.c | ||
| dbg_log.h | ||
| gai.c | ||
| getgrgid_r.c | ||
| getgrnam_r.c | ||
| gethstbyad_r.c | ||
| gethstbynm3_r.c | ||
| getpwnam_r.c | ||
| getpwuid_r.c | ||
| getsrvbynm_r.c | ||
| getsrvbypt_r.c | ||
| grpcache.c | ||
| hstcache.c | ||
| initgrcache.c | ||
| mem.c | ||
| netgroupcache.c | ||
| nscd-client.h | ||
| nscd.c | ||
| nscd.conf | ||
| nscd.h | ||
| nscd.init | ||
| nscd.service | ||
| nscd.tmpfiles | ||
| nscd_conf.c | ||
| nscd_getai.c | ||
| nscd_getgr_r.c | ||
| nscd_gethst_r.c | ||
| nscd_getpw_r.c | ||
| nscd_getserv_r.c | ||
| nscd_helper.c | ||
| nscd_initgroups.c | ||
| nscd_netgroup.c | ||
| nscd_proto.h | ||
| nscd_setup_thread.c | ||
| nscd_stat.c | ||
| pwdcache.c | ||
| res_hconf.c | ||
| selinux.c | ||
| selinux.h | ||
| servicescache.c | ||