aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2023-10-22 19:34:28 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-08 17:26:42 +0100
commitc27ca4aebbeee9ddf95fa1033dffc09e0caa3754 (patch)
tree5a7f16a46b97ae65d9861d233e12d9604ffe6e7c
parent21b07a2e6095ea57356527d20fe5bf2a5adbac3d (diff)
downloadaa-c27ca4aebbeee9ddf95fa1033dffc09e0caa3754.tar.gz
sparc32: fix a braino in fault handling in csum_and_copy_..._user()
commit 1f36cd05e0081f2c75769a551d584c4ffb2a5660 upstream. Fault handler used to make non-trivial calls, so it needed to set a stack frame up. Used to be save ... - grab a stack frame, old %o... become %i... .... ret - go back to address originally in %o7, currently %i7 restore - switch to previous stack frame, in delay slot Non-trivial calls had been gone since ab5e8b331244 and that code should have become retl - go back to address in %o7 clr %o0 - have return value set to 0 What it had become instead was ret - go back to address in %i7 - return address of *caller* clr %o0 - have return value set to 0 which is not good, to put it mildly - we forcibly return 0 from csum_and_copy_{from,to}_iter() (which is what the call of that thing had been inlined into) and do that without dropping the stack frame of said csum_and_copy_..._iter(). Confuses the hell out of the caller of csum_and_copy_..._iter(), obviously... Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Fixes: ab5e8b331244 "sparc32: propagate the calling conventions change down to __csum_partial_copy_sparc_generic()" Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/sparc/lib/checksum_32.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/lib/checksum_32.S b/arch/sparc/lib/checksum_32.S
index 781e39b3c009f9..481e94e1f6857d 100644
--- a/arch/sparc/lib/checksum_32.S
+++ b/arch/sparc/lib/checksum_32.S
@@ -453,5 +453,5 @@ ccslow: cmp %g1, 0
* we only bother with faults on loads... */
cc_fault:
- ret
+ retl
clr %o0