sched/signal: run no cleanup handlers on signal termination
Some checks are pending
Build Documentation / build-html (push) Waiting to run
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions

nxsig_abnormal_termination() popped the thread's pthread cleanup
handlers in the kernel, so in the protected and kernel builds a process
could get its own code called with kernel privilege by raising a fatal
signal. POSIX runs cleanup handlers on pthread_exit() and on acting upon
a cancellation; termination by a signal is as if by _exit(), which runs
none.

Signed-off-by: Royyan Zahir <royzah@gmail.com>
This commit is contained in:
Royyan Zahir 2026-10-02 17:25:38 +04:00 • committed by Alan C. Assis
parent 07c81e2673
commit 8df6e2a3f4

View file

@ -228,8 +228,6 @@ static void nxsig_abnormal_termination(int signo)
group_kill_children(rtcb);
#endif
tls_cleanup_popall(tls_get_info());
#ifndef CONFIG_DISABLE_PTHREAD
/* Check if the currently running task is actually a pthread */