Commit:     7d43e57764fe6922703c36d8d0d56a7ead21f03d
Parent:     5169b8a1659fef9cc093ed3d889a854945a18177
Author:     Benjamin Herrenschmidt <[EMAIL PROTECTED]>
AuthorDate: Thu May 24 15:41:04 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Sat Jun 2 21:01:55 2007 +1000

    [POWERPC] Fix ppc32 single-stepping out of syscalls
    The ppc32 kernel didn't properly set/clear the TIF_SINGLESTEP
    flag, causing return from syscalls to not SIGTRAP, thus executing
    one more instruction before stopping again.
    This fixes it.  The ptrace code is a bit of a mess, and is overdue
    for at least a -proper- 32/64 bits split and possibly more cleanups
    but this minimum fix should be ok for 2.6.22
    Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 arch/powerpc/kernel/ptrace.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index f4f391c..bf76562 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -218,6 +218,7 @@ set_single_step(struct task_struct *task)
                regs->msr |= MSR_SE;
+       set_tsk_thread_flag(task, TIF_SINGLESTEP);
 static inline void
@@ -233,6 +234,7 @@ clear_single_step(struct task_struct *task)
                regs->msr &= ~MSR_SE;
+       clear_tsk_thread_flag(task, TIF_SINGLESTEP);
 #endif /* CONFIG_PPC32 */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to