This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/20477] resolv: incorrect double-checked locking related to _res_hconf


https://sourceware.org/bugzilla/show_bug.cgi?id=20477

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  6f9d4f595e4073807ad0e844cbb3b3d7158b76d5 (commit)
      from  b65f0b7b2ecd144800830633a4c2719f11775572 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6f9d4f595e4073807ad0e844cbb3b3d7158b76d5

commit 6f9d4f595e4073807ad0e844cbb3b3d7158b76d5
Author: Torvald Riegel <triegel@redhat.com>
Date:   Wed Aug 17 13:56:11 2016 +0200

    Fix incorrect double-checked locking related to _res_hconf.initialized.

    _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.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                   |    9 +++++++++
 nscd/aicache.c              |    3 +--
 nss/getXXbyYY_r.c           |    3 +--
 resolv/res_hconf.c          |    3 ++-
 resolv/res_hconf.h          |    9 +++++++++
 sysdeps/posix/getaddrinfo.c |    3 +--
 6 files changed, 23 insertions(+), 7 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]