[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/18] signal/all: remove return value from copy_sigi
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL 03/18] signal/all: remove return value from copy_siginfo_to_user |
Date: |
Mon, 9 Jun 2014 15:46:28 +0300 |
From: Riku Voipio <address@hidden>
Since copy_siginfo_to_user always returns 0, make it void
and remove any checks for return value from calling functions.
Signed-off-by: Riku Voipio <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
---
linux-user/signal.c | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index ed2f50f..0bf6213 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -721,11 +721,10 @@ int do_sigaction(int sig, const struct target_sigaction
*act,
return ret;
}
-static inline int copy_siginfo_to_user(target_siginfo_t *tinfo,
+static inline void copy_siginfo_to_user(target_siginfo_t *tinfo,
const target_siginfo_t *info)
{
tswap_siginfo(tinfo, info);
- return 0;
}
static inline int current_exec_domain_sig(int sig)
@@ -985,9 +984,7 @@ static void setup_rt_frame(int sig, struct target_sigaction
*ka,
__put_user(addr, &frame->pinfo);
addr = frame_addr + offsetof(struct rt_sigframe, uc);
__put_user(addr, &frame->puc);
- err |= copy_siginfo_to_user(&frame->info, info);
- if (err)
- goto give_sigsegv;
+ copy_siginfo_to_user(&frame->info, info);
/* Create the ucontext. */
__put_user(0, &frame->uc.tuc_flags);
@@ -1361,9 +1358,7 @@ static void target_setup_frame(int usig, struct
target_sigaction *ka,
env->pc = ka->_sa_handler;
env->xregs[30] = return_addr;
if (info) {
- if (copy_siginfo_to_user(&frame->info, info)) {
- goto give_sigsegv;
- }
+ copy_siginfo_to_user(&frame->info, info);
env->xregs[1] = frame_addr + offsetof(struct target_rt_sigframe, info);
env->xregs[2] = frame_addr + offsetof(struct target_rt_sigframe, uc);
}
@@ -3361,7 +3356,7 @@ static void setup_rt_frame(int sig, struct
target_sigaction *ka,
signal = current_exec_domain_sig(sig);
- err |= copy_siginfo_to_user(&frame->info, info);
+ copy_siginfo_to_user(&frame->info, info);
/* Create the ucontext. */
__put_user(0, &frame->uc.tuc_flags);
@@ -4041,10 +4036,7 @@ static void setup_rt_frame(int sig, struct
target_sigaction *ka,
__put_user(uc_addr, &frame->puc);
if (ka->sa_flags & SA_SIGINFO) {
- err |= copy_siginfo_to_user(&frame->info, info);
- }
- if (err) {
- goto give_sigsegv;
+ copy_siginfo_to_user(&frame->info, info);
}
/*err |= __clear_user(&frame->uc, offsetof(struct ucontext,
uc_mcontext));*/
@@ -4304,9 +4296,7 @@ static void setup_rt_frame(int sig, struct
target_sigaction *ka,
}
qemu_log("%s: 1\n", __FUNCTION__);
- if (copy_siginfo_to_user(&frame->info, info)) {
- goto give_sigsegv;
- }
+ copy_siginfo_to_user(&frame->info, info);
/* Create the ucontext. */
__put_user(0, &frame->uc.tuc_flags);
@@ -4880,7 +4870,7 @@ static void setup_rt_frame(int sig, struct
target_sigaction *ka,
signal = current_exec_domain_sig(sig);
- err |= copy_siginfo_to_user(&rt_sf->info, info);
+ copy_siginfo_to_user(&rt_sf->info, info);
__put_user(0, &rt_sf->uc.tuc_flags);
__put_user(0, &rt_sf->uc.tuc_link);
@@ -5299,7 +5289,7 @@ static void setup_rt_frame(int sig, struct
target_sigaction *ka,
uc_addr = frame_addr + offsetof(struct target_rt_sigframe, uc);
__put_user(uc_addr, &frame->puc);
- err |= copy_siginfo_to_user(&frame->info, info);
+ copy_siginfo_to_user(&frame->info, info);
/* Create the ucontext */
@@ -5585,7 +5575,7 @@ static void setup_rt_frame(int sig, struct
target_sigaction *ka,
goto give_sigsegv;
}
- err |= copy_siginfo_to_user(&frame->info, info);
+ copy_siginfo_to_user(&frame->info, info);
__put_user(0, &frame->uc.tuc_flags);
__put_user(0, &frame->uc.tuc_link);
--
2.0.0.rc2
- [Qemu-devel] [PULL 00/18] linux-user fixes, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 02/18] signal/x86/setup_frame: __put_user cleanup, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 17/18] linux-user: Return correct errno for unsupported netlink socket, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 10/18] signal/ppc/{save, restore}_user_regs remove __put/get error checks, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 12/18] signal/ppc/do_setcontext remove __get_user return check, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 13/18] linux-user: fix gcc-4.9 compiler error on __{get, put]}_user, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 08/18] signal/all/do_sigreturn - remove __get_user checks, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 01/18] signal/all: remove __get/__put_user return value reading, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 18/18] User mode support for Linux ELF files with no section header, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 07/18] signal/all/do_sigaltstack remove __get_user value check, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 03/18] signal/all: remove return value from copy_siginfo_to_user,
riku . voipio <=
- [Qemu-devel] [PULL 06/18] signal/sparc/restore_fpu_state: remove, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 05/18] signal/all: remove return value from restore_sigcontext, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 15/18] linux-user: Don't overrun guest buffer in sched_getaffinity, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 14/18] linux-user/uname: Return correct uname string for x86_64, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 11/18] signal/sparc64_set_context: remove __get_user checks, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 16/18] linux-user: Tell guest about big host page sizes, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 04/18] signal/all: remove return value from setup_sigcontext, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 09/18] signal/all/setup_frame remove __put_user checks, riku . voipio, 2014/06/09
- Re: [Qemu-devel] [PULL 00/18] linux-user fixes, Peter Maydell, 2014/06/09