From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>,
leonardo.macchia@gmail.com
Subject: Re: [PATCH 1/3] inet: Fix getnameinfo (NI_NOFQDN) race condition (BZ#28566)
Date: Thu, 11 Nov 2021 18:41:14 +0100 [thread overview]
Message-ID: <878rxuwpxh.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <8dee4235-b730-dad4-6497-2ba13d9c4f8d@linaro.org> (Adhemerval Zanella's message of "Thu, 11 Nov 2021 11:17:11 -0300")
* Adhemerval Zanella:
> On 11/11/2021 11:12, Florian Weimer wrote:
>> * Adhemerval Zanella:
>>
>>> I meant H.J internal lock optimization [1], where the lll_lock int this
>>> case will be mostly a relaxed load instead of a CAS (since once 'domain'
>>> is properly initialized, there is no need to take the lock).
>>>
>>> [1] https://sourceware.org/pipermail/libc-alpha/2021-November/132899.html
>>
>> It doesn't work this way. It still does a CAS.
>
> Yeah, it helps only on contended case. Do you think we need to keep the
> double-check optimization here?
I would say yes. It also helps with fork safety. After the first call,
concurrent forks won't get a bad lock state.
Thanks,
Florian
next prev parent reply other threads:[~2021-11-11 17:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 18:58 [PATCH 0/3] Fixes for getnameinfo() with NI_NOFQDN Adhemerval Zanella
2021-11-10 18:58 ` [PATCH 1/3] inet: Fix getnameinfo (NI_NOFQDN) race condition (BZ#28566) Adhemerval Zanella
2021-11-11 8:16 ` Florian Weimer
2021-11-11 13:34 ` Adhemerval Zanella
2021-11-11 13:54 ` Florian Weimer
2021-11-11 14:09 ` Adhemerval Zanella
2021-11-11 14:12 ` Florian Weimer
2021-11-11 14:17 ` Adhemerval Zanella
2021-11-11 17:41 ` Florian Weimer [this message]
2021-11-10 18:58 ` [PATCH 2/3] inet: Remove strdupa from nrl_domainname() Adhemerval Zanella
2021-11-11 8:18 ` Florian Weimer
2021-11-11 13:36 ` Adhemerval Zanella
2021-11-11 14:00 ` Florian Weimer
2021-11-10 18:58 ` [PATCH 3/3] inet: Return EAI_MEMORY when nrl_domainname() fails to allocate memory Adhemerval Zanella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rxuwpxh.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=leonardo.macchia@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).