[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL for-2.0 1/7] linux-user/signal.c: Correct error path
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL for-2.0 1/7] linux-user/signal.c: Correct error path for AArch64 do_rt_sigreturn |
Date: |
Wed, 19 Mar 2014 16:02:56 +0200 |
From: Peter Maydell <address@hidden>
The error path in AArch64 do_rt_sigreturn() which fails before
attempting lock_user_struct() was doing an unlock_user_struct()
on an uninitialized variable. Initialize frame to NULL so we
can use the same error-exit path in all cases (unlock of NULL
is permitted and does nothing).
Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 24c91f3..209855e 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -1340,7 +1340,7 @@ static void setup_frame(int sig, struct target_sigaction
*ka,
long do_rt_sigreturn(CPUARMState *env)
{
- struct target_rt_sigframe *frame;
+ struct target_rt_sigframe *frame = NULL;
abi_ulong frame_addr = env->xregs[31];
if (frame_addr & 15) {
--
1.8.1.2
- [Qemu-devel] [PULL for-2.0 0/7] linux-user patches, riku . voipio, 2014/03/19
- [Qemu-devel] [PULL for-2.0 3/7] linux-user: implement F_[GS]ETOWN_EX, riku . voipio, 2014/03/19
- [Qemu-devel] [PULL for-2.0 2/7] linux-user: Don't return uninitialized value for atomic_barrier syscall, riku . voipio, 2014/03/19
- [Qemu-devel] [PULL for-2.0 1/7] linux-user/signal.c: Correct error path for AArch64 do_rt_sigreturn,
riku . voipio <=
- [Qemu-devel] [PULL for-2.0 4/7] linux-user: Don't reserve space for commpage for AArch64, riku . voipio, 2014/03/19
- [Qemu-devel] [PULL for-2.0 5/7] signal: added a wrapper for sigprocmask function, riku . voipio, 2014/03/19
- [Qemu-devel] [PULL for-2.0 6/7] linux-user: Don't allow guest to block SIGSEGV, riku . voipio, 2014/03/19
- [Qemu-devel] [PULL for-2.0 7/7] linux-user: Implement capget, capset, riku . voipio, 2014/03/19
- Re: [Qemu-devel] [PULL for-2.0 0/7] linux-user patches, Peter Maydell, 2014/03/19