glibc/rt
Adhemerval Zanella 27d83441a2 Block all signals on timer_create thread (BZ#10815)
The behavior of the signal mask on threads created by timer_create
for SIGEV_THREAD timers are implementation-defined and glibc explicit
unblocks all signals before calling the user-defined function.

This behavior, although not incorrect standard-wise, opens a race if a
program using a blocked rt-signal plus sigwaitinfo (and without an
installed signal handler for the rt-signal) receives a signal while
executing the used-defined function for SIGEV_THREAD.

A better alternative discussed in bug report is to rather block all
signals (besides the internal ones not available to application
usage).

This patch fixes this issue by only unblocking SIGSETXID (used on
set*uid function) and SIGCANCEL (used for thread cancellation).

Checked on x86_64-linux-gnu and i686-linux-gnu.
2020-02-19 13:46:31 -03:00
..
bits
aio_cancel.c
aio_error.c
aio_fsync.c
aio_misc.c
aio_notify.c
aio_read64.c
aio_read.c
aio_return.c
aio_sigqueue.c
aio_suspend.c
aio_write64.c
aio_write.c
aio.h
Depend
lio_listio64.c
lio_listio.c
Makefile
mq_close.c
mq_getattr.c
mq_notify.c
mq_open.c
mq_receive.c
mq_send.c
mq_setattr.c
mq_timedreceive.c
mq_timedsend.c
mq_unlink.c
mqueue.h
shm_open.c
shm_unlink.c
timer_create.c
timer_delete.c
timer_getoverr.c
timer_gettime.c
timer_settime.c
tst-aio2.c
tst-aio3.c
tst-aio4.c
tst-aio5.c
tst-aio6.c
tst-aio7.c
tst-aio8.c
tst-aio9.c
tst-aio10.c
tst-aio64.c
tst-aio.c
tst-cpuclock2.c
tst-cputimer1.c
tst-cputimer2.c
tst-cputimer3.c
tst-mqueue1.c
tst-mqueue2.c
tst-mqueue3.c
tst-mqueue4.c
tst-mqueue5.c
tst-mqueue6.c
tst-mqueue7.c
tst-mqueue8.c
tst-mqueue9.c
tst-mqueue.h
tst-shm-cancel.c
tst-shm.c
tst-timer2.c
tst-timer3.c
tst-timer4.c
tst-timer5.c
tst-timer-sigmask.c
tst-timer.c
Versions