]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
alpha: fix handling of a3 on straced syscalls
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Sep 2021 22:27:12 +0000 (18:27 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 30 Oct 2022 03:31:15 +0000 (23:31 -0400)
For successful syscall that happens to return a negative, we want
a3 set to 0, no matter whether it's straced or not.  As it is,
for straced case we leave the value it used to have on syscall
entry.  Easily fixed, fortunately...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/alpha/kernel/entry.S

index c41a5a9c3b9f2351ad8c95b38820e9bd9e069d9d..78fe7ee254250ca8c895f4536b70a8ccab42bab1 100644 (file)
@@ -600,8 +600,8 @@ ret_from_straced:
 
        /* check return.. */
        blt     $0, $strace_error       /* the call failed */
-       stq     $31, 72($sp)            /* a3=0 => no error */
 $strace_success:
+       stq     $31, 72($sp)            /* a3=0 => no error */
        stq     $0, 0($sp)              /* save return value */
 
        DO_SWITCH_STACK