File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ typedef enum {
7070} td_flags_t ;
7171
7272typedef enum {
73+ /* After user context setup in execve TDP_* flags that should not be inherited
74+ * should be cleared */
7375 TDP_OLDSIGMASK = 0x01 , /* Pass td_oldsigmask as return mask to send_sig(). */
7476 TDP_FPUCTXSAVED = 0x02 , /* FPU context was saved by `ctx_switch`. */
7577 TDP_FPUINUSE = 0x04 /* FPU is in use and its context should be saved &
Original file line number Diff line number Diff line change @@ -411,6 +411,9 @@ static int _do_execve(exec_args_t *args) {
411411 /* Set up user context. */
412412 mcontext_init (td -> td_uctx , (void * )eh .e_entry , (void * )stack_top );
413413
414+ /* All thread pflags that should not be inherited should be cleared */
415+ td -> td_pflags = 0 ;
416+
414417 WITH_PROC_LOCK (p ) {
415418 sig_onexec (p );
416419 /* Set new credentials if needed */
You can’t perform that action at this time.
0 commit comments