]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sh: Fix up restorer in debug_trap exception return path.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 19 May 2008 10:39:33 +0000 (19:39 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 19 May 2008 10:39:33 +0000 (19:39 +0900)
commit336f1d326831873ffab6de5fcec4b3be05103ae0
tree832dfd3be4d03275fa0a609df47b5115fa3ebac1
parent9a33fc217d2248838d52f8ef214b1909073f3eb4
sh: Fix up restorer in debug_trap exception return path.

There are a few different types of debug trap exceptions, though now
that they are all going through a special jump table, the restorer needs
to be unified as well.

Presently this is falling through the ret_from_fork path, which more or
less does the right thing on SH-3/4 whilst being completely unsuitable on
MMU-less targets.

Ultimately what we want here is a branch through the platform's
restore_all directly, without worrying about the retval being clobbered.
We can accomplish that through a branch to __restore_all directly, so
switch it so we come back from the jump table and branch to the restorer.

This fixes up a recursion in the nommu WARN_ON() path, as well as some
other userspace nastiness where said recursion caused serious stack
corruption.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/entry-common.S