This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 8df6e2a3f45bf4a6cef791fb3cf9fb36e34cdb30
Author: Royyan Zahir <[email protected]>
AuthorDate: Fri Oct 2 17:25:38 2026 +0400

    sched/signal: run no cleanup handlers on signal termination
    
    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 <[email protected]>
---
 sched/signal/sig_default.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sched/signal/sig_default.c b/sched/signal/sig_default.c
index ecb1adf8a70..75f05cbcd1c 100644
--- a/sched/signal/sig_default.c
+++ b/sched/signal/sig_default.c
@@ -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 */
 

Reply via email to