From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>,
Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Subject: Re: [PATCH 2/2] stdlib: Make abort AS-safe (BZ 26275)
Date: Wed, 2 Aug 2023 10:08:36 -0300 [thread overview]
Message-ID: <3db369f1-6edd-f876-b9ac-a78f0c51cc82@linaro.org> (raw)
In-Reply-To: <87v8dxsjow.fsf@oldenburg.str.redhat.com>
On 02/08/23 09:38, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
>
>> diff --git a/nptl/pthread_kill.c b/nptl/pthread_kill.c
>> index 44e45a4e23..e3364fb5d1 100644
>> --- a/nptl/pthread_kill.c
>> +++ b/nptl/pthread_kill.c
>> @@ -69,6 +69,17 @@ __pthread_kill_implementation (pthread_t threadid, int signo, int no_tid)
>> return ret;
>> }
>>
>> +/* Send the signal SIGNO to the caller. Used by abort and called where the
>> + signals are being already blocked and there is no need to synchronize with
>> + exit_lock. */
>> +int
>> +__pthread_raise_internal (int signo)
>> +{
>> + struct pthread *pd = THREAD_SELF;
>> + int ret = INTERNAL_SYSCALL_CALL (tgkill, __getpid (), pd->tid, signo);
>> + return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
>> +}
>
> This needs to use gettid (the system call) so that it works after vfork,
> which may have an incorrect pd->tid.
>
> There should be a comment to this effect in pthread_kill implementation
> already.
>
Ack.
prev parent reply other threads:[~2023-08-02 13:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 17:18 [PATCH 0/2] Make abort AS-safe Adhemerval Zanella
2023-07-31 17:18 ` [PATCH 1/2] setjmp: Use BSD sematic as default for setjmp Adhemerval Zanella
2023-08-01 8:35 ` Florian Weimer
2023-08-01 13:51 ` Adhemerval Zanella Netto
2023-08-02 7:59 ` Florian Weimer
2023-08-02 12:32 ` Adhemerval Zanella Netto
2023-08-02 12:42 ` Florian Weimer
2023-08-02 12:48 ` Adhemerval Zanella Netto
2023-08-02 13:17 ` Florian Weimer
2023-08-02 13:29 ` Adhemerval Zanella Netto
2023-08-02 14:43 ` Florian Weimer
2023-08-02 14:56 ` Adhemerval Zanella Netto
2023-07-31 17:19 ` [PATCH 2/2] stdlib: Make abort AS-safe (BZ 26275) Adhemerval Zanella
2023-08-01 8:10 ` Florian Weimer
2023-08-01 13:52 ` Adhemerval Zanella Netto
2023-08-01 8:26 ` Florian Weimer
2023-08-01 13:57 ` Adhemerval Zanella Netto
2023-08-01 13:44 ` Cristian Rodríguez
2023-08-02 7:57 ` Florian Weimer
2023-08-02 13:08 ` Adhemerval Zanella Netto
2023-08-02 14:44 ` Florian Weimer
2023-08-02 14:48 ` Adhemerval Zanella Netto
2023-08-02 12:38 ` Florian Weimer
2023-08-02 13:08 ` Adhemerval Zanella Netto [this message]
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=3db369f1-6edd-f876-b9ac-a78f0c51cc82@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=fweimer@redhat.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).