diff options
Diffstat (limited to 'fs/exec.c')
| -rw-r--r-- | fs/exec.c | 12 |
1 files changed, 11 insertions, 1 deletions
| @@ -926,10 +926,14 @@ static int de_thread(struct task_struct *tsk) | |||
| 926 | if (!thread_group_leader(tsk)) { | 926 | if (!thread_group_leader(tsk)) { |
| 927 | struct task_struct *leader = tsk->group_leader; | 927 | struct task_struct *leader = tsk->group_leader; |
| 928 | 928 | ||
| 929 | sig->notify_count = -1; /* for exit_notify() */ | ||
| 930 | for (;;) { | 929 | for (;;) { |
| 931 | threadgroup_change_begin(tsk); | 930 | threadgroup_change_begin(tsk); |
| 932 | write_lock_irq(&tasklist_lock); | 931 | write_lock_irq(&tasklist_lock); |
| 932 | /* | ||
| 933 | * Do this under tasklist_lock to ensure that | ||
| 934 | * exit_notify() can't miss ->group_exit_task | ||
| 935 | */ | ||
| 936 | sig->notify_count = -1; | ||
| 933 | if (likely(leader->exit_state)) | 937 | if (likely(leader->exit_state)) |
| 934 | break; | 938 | break; |
| 935 | __set_current_state(TASK_KILLABLE); | 939 | __set_current_state(TASK_KILLABLE); |
| @@ -1078,7 +1082,13 @@ int flush_old_exec(struct linux_binprm * bprm) | |||
| 1078 | if (retval) | 1082 | if (retval) |
| 1079 | goto out; | 1083 | goto out; |
| 1080 | 1084 | ||
| 1085 | /* | ||
| 1086 | * Must be called _before_ exec_mmap() as bprm->mm is | ||
| 1087 | * not visibile until then. This also enables the update | ||
| 1088 | * to be lockless. | ||
| 1089 | */ | ||
| 1081 | set_mm_exe_file(bprm->mm, bprm->file); | 1090 | set_mm_exe_file(bprm->mm, bprm->file); |
| 1091 | |||
| 1082 | /* | 1092 | /* |
| 1083 | * Release all of the old mmap stuff | 1093 | * Release all of the old mmap stuff |
| 1084 | */ | 1094 | */ |
