Commit:     aa770aa790f3a5f3ff568388d02aea2ef78773ec
Parent:     7728ec33faf88605fb871b9b0ecf8e45d4359678
Author:     Robin Getz <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 29 18:14:15 2007 +0800
Committer:  Bryan Wu <[EMAIL PROTECTED]>
CommitDate: Mon Oct 29 18:14:15 2007 +0800

    Blackfin arch: Fix random crash issue found by Michael.
    This is fixes a problem where we could jump to the wrong address. By
    doing a "p0 = reti; jump (p0)". If a different, higher level interrupt
    came in, just before, rather than returning to the calling function, we
    would return to a random place in the kernel.
    This very elegant fix from Bernd grabs the return location off the
    stack, and places it into P0, so when we do a return, it goes to the
    correct place.
    Signed-off-by: Robin Getz <[EMAIL PROTECTED]>
    Signed-off-by: Bryan Wu <[EMAIL PROTECTED]>
 arch/blackfin/kernel/entry.S |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/blackfin/kernel/entry.S b/arch/blackfin/kernel/entry.S
index 65c5ba4..65f4e67 100644
--- a/arch/blackfin/kernel/entry.S
+++ b/arch/blackfin/kernel/entry.S
@@ -54,9 +54,11 @@ ENTRY(_ret_from_fork)
        [sp + PT_IPEND] = r0;
        /* do a 'fake' RTI by jumping to [RETI]
         * to avoid clearing supervisor mode in child
-       */
+        */
+       r0 = [sp + PT_PC];
+       [sp + PT_P0] = r0;
-       p0 = reti;
        jump (p0);
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