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. |
||
|---|---|---|
| .. | ||
| nss_db | ||
| nss_files | ||
| Depend | ||
| Makefile | ||
| Versions | ||
| XXX-lookup.c | ||
| alias-lookup.c | ||
| bug-erange.c | ||
| bug17079.c | ||
| databases.def | ||
| db-Makefile | ||
| digits_dots.c | ||
| ethers-lookup.c | ||
| function.def | ||
| getXXbyYY.c | ||
| getXXbyYY_r.c | ||
| getXXent.c | ||
| getXXent_r.c | ||
| getent.c | ||
| getnssent.c | ||
| getnssent_r.c | ||
| grp-lookup.c | ||
| hosts-lookup.c | ||
| key-lookup.c | ||
| makedb.c | ||
| netgrp-lookup.c | ||
| network-lookup.c | ||
| nss.h | ||
| nss_test1.c | ||
| nsswitch.c | ||
| nsswitch.conf | ||
| nsswitch.h | ||
| proto-lookup.c | ||
| pwd-lookup.c | ||
| rewrite_field.c | ||
| rpc-lookup.c | ||
| service-lookup.c | ||
| sgrp-lookup.c | ||
| spwd-lookup.c | ||
| test-digits-dots.c | ||
| test-netdb.c | ||
| tst-field.c | ||
| tst-nss-getpwent.c | ||
| tst-nss-static.c | ||
| tst-nss-test1.c | ||
| valid_field.c | ||
| valid_list_field.c | ||