The patch titled do_wait-fix-security-checks-fix has been added to the -mm tree. Its filename is do_wait-fix-security-checks-fix.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: do_wait-fix-security-checks-fix From: Oleg Nesterov <oleg@xxxxxxxxxx> On 11/24, Oleg Nesterov wrote: > > - if (!flag) { > + if (flag) > + continue; This "last obvious cleanup right before sending the patch" is terribly wrong, we can't continue, we must advance the tsk to the next_thread(). Cc: Roland McGrath <roland@xxxxxxxxxx> Cc: Chris Wright <chrisw@xxxxxxxxxxxx> Cc: Eric Paris <eparis@xxxxxxxxxx> Cc: James Morris <jmorris@xxxxxxxxx> Cc: Stephen Smalley <sds@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/exit.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff -puN kernel/exit.c~do_wait-fix-security-checks-fix kernel/exit.c --- a/kernel/exit.c~do_wait-fix-security-checks-fix +++ a/kernel/exit.c @@ -1536,16 +1536,17 @@ repeat: if (retval != 0) /* tasklist_lock released */ goto end; } - if (flag) - continue; - list_for_each_entry(p, &tsk->ptrace_children, ptrace_list) { - flag = eligible_child(pid, options, p); - if (!flag) - continue; - if (likely(flag > 0)) - break; - retval = flag; - goto end; + if (!flag) { + list_for_each_entry(p, &tsk->ptrace_children, + ptrace_list) { + flag = eligible_child(pid, options, p); + if (!flag) + continue; + if (likely(flag > 0)) + break; + retval = flag; + goto end; + } } if (options & __WNOTHREAD) break; _ Patches currently in -mm which might be from oleg@xxxxxxxxxx are wait_task_stopped-dont-use-task_pid_nr_ns-lockless.patch proc-remove-races-from-proc_id_readdir.patch wait_task_stopped-pass-correct-exit_code-to.patch use-__set_task_state-for-traced-stopped-tasks.patch add-task_wakekill.patch do_wait-remove-one-else-if-branch.patch proc-implement-proc_single_file_operations.patch proc-rewrite-do_task_stat-to-correctly-handle-pid-namespaces.patch proc-seqfile-convert-proc_pid_statm.patch proc-proper-pidns-handling-for-proc-self.patch proc-fix-the-threaded-proc-self.patch kill-pt_attached.patch kill-my_ptrace_child.patch ptrace_check_attach-remove-unneeded-signal-=-null-check.patch ptrace_stop-fix-the-race-with-ptrace-detachattach.patch wait_task_stopped-simplify-and-fix-races-with-sigcont-sigkill-untrace.patch do_wait-factor-out-retval-=-0-checks.patch ptrace_stop-fix-racy-nonstop_code-setting.patch wait_task_stopped-remove-unneeded-delay_group_leader-check.patch do_wait-cleanup-delay_group_leader-usage.patch do_wait-fix-security-checks.patch do_wait-fix-security-checks-fix.patch wait_task_continued-zombie-dont-use-task_pid_nr_ns-lockless.patch wait_task_zombie-remove-exit_state-exit_signal-checks-for-wnowait.patch sys_setpgid-simplify-pid-ns-interaction.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html