OSDN Git Service

linux-user/s390x: Fix frame_addr corruption in setup_frame
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 28 Apr 2021 19:34:05 +0000 (12:34 -0700)
committerLaurent Vivier <laurent@vivier.eu>
Sat, 15 May 2021 19:44:38 +0000 (21:44 +0200)
The original value of frame_addr is still required for
its use in the call to unlock_user_struct below.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210428193408.233706-13-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/s390x/signal.c

index bc41b01..81ba59b 100644 (file)
@@ -168,7 +168,7 @@ void setup_frame(int sig, struct target_sigaction *ka,
     env->psw.addr = ka->_sa_handler;
 
     env->regs[2] = sig;
-    env->regs[3] = frame_addr += offsetof(typeof(*frame), sc);
+    env->regs[3] = frame_addr + offsetof(typeof(*frame), sc);
 
     /*
      * We forgot to include these in the sigcontext.