Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fb322915a05804a3a153f714f2f08e4c32ce84c7
Commit:     fb322915a05804a3a153f714f2f08e4c32ce84c7
Parent:     569a50ca3f56cd69199733580e7ca0e81029473a
Author:     Robin Getz <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 21 16:38:05 2007 +0800
Committer:  Bryan Wu <[EMAIL PROTECTED]>
CommitDate: Wed Nov 21 16:38:05 2007 +0800

    Blackfin arch: fix bug when sending signals with the wrong PC, cause gdb 
get confused
    
    We need to send signals with the proper PC, or gdb gets
    confused, and lots of tests fail. This should fix that.
    
    Signed-off-by: Robin Getz <[EMAIL PROTECTED]>
    Signed-off-by: Bryan Wu <[EMAIL PROTECTED]>
---
 arch/blackfin/kernel/traps.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index d88098c..910cdd4 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -463,18 +463,20 @@ asmlinkage void trap_c(struct pt_regs *fp)
 #endif
                        panic("Kernel exception");
                }
-
-               /* Ensure that bad return addresses don't end up in an infinite
-                * loop, due to speculative loads/reads
-                */
-               if (trapnr == VEC_CPLB_I_M)
-                       fp->pc = SAFE_USER_INSTRUCTION;
        }
+
        info.si_signo = sig;
        info.si_errno = 0;
        info.si_addr = (void *)fp->pc;
        force_sig_info(sig, &info, current);
 
+       /* Ensure that bad return addresses don't end up in an infinite
+        * loop, due to speculative loads/reads. This needs to be done after
+        * the signal has been sent.
+        */
+       if (trapnr == VEC_CPLB_I_M && sig != SIGTRAP)
+               fp->pc = SAFE_USER_INSTRUCTION;
+
        trace_buffer_restore(j);
        return;
 }
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to