Commit:     c824498db47285aeff430c007685a193b673c949
Parent:     a9c59c2746c7e773839d51027c0e16ccf41f8fef
Author:     Bernd Schmidt <[EMAIL PROTECTED]>
AuthorDate: Mon May 21 18:09:33 2007 +0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon May 21 09:50:23 2007 -0700

    Blackfin arch: fix signal handling bug
    There's a forum thread at
    which has a testcase involving signal handling that crashes quite readily.
    Inspecting the code I believe what happens is that signal handling can 
    confused when it is invoked on return from an interrupt, if the contents of
    P0 and R0 at the time of the interrupt happen to be such that P0 is larger
    than zero (indicating to the signal code that we're in a syscall), and R0
    happens to have a value of something like -EINTR or -ERESTARTSYS.
    Fixed by setting orig_p0 to -1 if we're returning from an interrupt.  The
    testcase now seems to run without problems.
    Signed-off-by: Bernd Schmidt <[EMAIL PROTECTED]>
    Signed-off-by: Bryan Wu <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 arch/blackfin/mach-common/entry.S |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/blackfin/mach-common/entry.S 
index e463733..7d03687 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -712,6 +712,11 @@ _schedule_and_signal_from_int:
        p1.h = _evt_system_call;
        [p0] = p1;
+       /* Set orig_p0 to -1 to indicate this isn't the end of a syscall.  */
+       r0 = -1 (x);
+       [sp + PT_ORIG_P0] = r0;
        p1 = rets;
        [sp + PT_RESERVED] = p1;
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