diff --git a/kernel.spec b/kernel.spec index 2987f76dc..ca0a432bd 100644 --- a/kernel.spec +++ b/kernel.spec @@ -852,6 +852,9 @@ Patch14014: ipv6-make-fragment-identifications-less-predictable.patch # RHBZ #699684 Patch14020: x86-mm-fix-pgd_lock-deadlock.patch +# RHBZ #573210 +Patch14030: utrace-use-task_pid_vnr-in-ptrace_report_clone.patch + %endif BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root @@ -1603,6 +1606,9 @@ ApplyPatch ipv6-make-fragment-identifications-less-predictable.patch # RHBZ #699684 ApplyPatch x86-mm-fix-pgd_lock-deadlock.patch +# RHBZ #573210 +ApplyPatch utrace-use-task_pid_vnr-in-ptrace_report_clone.patch + # END OF PATCH APPLICATIONS %endif @@ -2189,6 +2195,9 @@ fi # and build. %changelog +* Mon Aug 29 2011 Josh Boyer +- Add fix from Oleg Nesterov for RHBZ #573210 + * Wed Aug 24 2011 Chuck Ebbert - Add fix for RHBZ #699684: System freeze with 2.6.35.12-*.fc14.i686.PAE diff --git a/utrace-use-task_pid_vnr-in-ptrace_report_clone.patch b/utrace-use-task_pid_vnr-in-ptrace_report_clone.patch new file mode 100644 index 000000000..15d9a4849 --- /dev/null +++ b/utrace-use-task_pid_vnr-in-ptrace_report_clone.patch @@ -0,0 +1,24 @@ +https://bugzilla.redhat.com/show_bug.cgi?id=573210 + +ptrace_report_clone() uses child->pid, this is obviously wrong unless +the tracer is from the global namespace. Change it to use task_pid_vnr(). + +This is still not right, we should use the tracer's namespace, not +parent's. But this matches upstream, and at least this works if they +are from the same namespace. + +Reported-by: Robin Green +Signed-off-by: Oleg Nesterov + +--- a/kernel/ptrace-utrace.c ++++ b/kernel/ptrace-utrace.c +@@ -403,7 +403,7 @@ static u32 ptrace_report_clone(u32 actio + return UTRACE_RESUME; + + set_stop_code(ctx, event); +- ctx->eventmsg = child->pid; ++ ctx->eventmsg = task_pid_vnr(child); + /* + * We shouldn't stop now, inside the do_fork() path. + * We will stop later, before return to user-mode. +