[PATCH Fix incorrect double-checked locking related to _res_hconf.initialized. [BZ #20477]

Andreas Schwab schwab@suse.de
Wed Aug 17 14:51:00 GMT 2016


On Aug 17 2016, Torvald Riegel <triegel@redhat.com> wrote:

> diff --git a/resolv/res_hconf.h b/resolv/res_hconf.h
> index b97734d..a3d23f3 100644
> --- a/resolv/res_hconf.h
> +++ b/resolv/res_hconf.h
> @@ -25,6 +25,15 @@
>  
>  struct hconf
>  {
> +  /* We keep the INITIALIZED member only for backwards compatibility.  New
> +     code should just call _res_hconf_init unconditionally.  For this field
> +     to be used safely, users must ensure that either (1) a call to
> +     _res_hconf_init happens-before any load from INITIALIZED, or (2) an
                               ^
> +     assignment of zero to INITIALIZED happens-before any load from it, and
                                                 ^

Those hyphens look wrong.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



More information about the Libc-alpha mailing list