[PATCH v2 3/9] nptl: Install cancellation handler on pthread_cancel

Florian Weimer fweimer@redhat.com
Tue Jun 1 08:38:45 GMT 2021


* Adhemerval Zanella via Libc-alpha:

> On 27/05/2021 14:28, Adhemerval Zanella wrote:
>> Now that cancellation is not used anymore to handle thread setup
>> creation failure, the sighandle can be installed only when
>> pthread_cancel is actually used.
>> 
>> Checked on x86_64-linux-gnu and aarch64-linux-gnu.
>
> I also think it fixes BZ#14744, the cancellation handler is now used
> solely when pthread_cancel is actually issue.  The sigcancel_handler
> already prevents signals from other processes and cancellation from
> other processes are an extension that I think it does not really
> make sense (as Carlos has pointed ack on the bug report).

I'm not sure if bug 14744 actually exists, given the checks we have in
the cancellation signal handler.  Particularly the si_pid check should
block acting on signals sent from another process.  And locally, we
filter out the NPTL signals in the system call wrapppers (and we
consider direct system calls undefined in this context).

Thanks,
Florian



More information about the Libc-alpha mailing list