[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/26] linux-user: Recheck for pending synchronous si
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL 17/26] linux-user: Recheck for pending synchronous signals too |
Date: |
Thu, 22 Sep 2016 15:13:37 +0300 |
From: Peter Maydell <address@hidden>
In process_pending_signals() we restart the scan of possible
pending signals after calling handle_pending_signal() in
case some other signal has been generated. This rescan
should also include a check for a new synchronous signal
since those are in fact the only kind of new signal that
the signal frame setup process might produce.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/signal.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 3337f1e..f2c9f8e 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -5925,6 +5925,7 @@ void process_pending_signals(CPUArchState *cpu_env)
sigfillset(&set);
sigprocmask(SIG_SETMASK, &set, 0);
+ restart_scan:
sig = ts->sync_signal.pending;
if (sig) {
/* Synchronous signals are forced,
@@ -5952,8 +5953,10 @@ void process_pending_signals(CPUArchState *cpu_env)
(!sigismember(blocked_set,
target_to_host_signal_table[sig]))) {
handle_pending_signal(cpu_env, sig, &ts->sigtab[sig - 1]);
- /* Restart scan from the beginning */
- sig = 1;
+ /* Restart scan from the beginning, as handle_pending_signal
+ * might have resulted in a new synchronous signal (eg
SIGSEGV).
+ */
+ goto restart_scan;
}
}
--
2.1.4
- [Qemu-devel] [PULL 08/26] linux-user: report signals being taken in strace output, (continued)
- [Qemu-devel] [PULL 08/26] linux-user: report signals being taken in strace output, riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 06/26] linux-user: Check for bad event numbers in epoll_wait, riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 09/26] linux-user: Pass missing MAP_ANONYMOUS to target_mmap() call, riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 11/26] linux-user: Fix incorrect use of host errno in do_ioctl_dm(), riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 10/26] linux-user: Check lock_user() return value for NULL, riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 13/26] linux-user: Check dump_write() return in elf_core_dump(), riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 15/26] linux-user: Use correct target SHMLBA in shmat(), riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 14/26] linux-user: Use glib malloc functions in load_symbols(), riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 12/26] linux-user: Fix error handling in flatload.c target_pread(), riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 16/26] linux-user: ppc64: set MSR_CM bit for BookE 2.06 MMU, riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 17/26] linux-user: Recheck for pending synchronous signals too,
riku . voipio <=
- [Qemu-devel] [PULL 18/26] linux-user: Pass si_type information to queue_signal() explicitly, riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 24/26] linux-user: Sanity check clone flags, riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 19/26] linux-user: SIGSEGV on signal entry need not be fatal, riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 20/26] linux-user: ARM: Give SIGSEGV if signal frame setup fails, riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 21/26] linux-user: SIGSEGV from sigreturn need not be fatal, riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 22/26] linux-user: Implement force_sigsegv() via force_sig(), riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 23/26] linux-user: Remove unnecessary nptl_flags variable from do_fork(), riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 25/26] linux-user: Fix incorrect offset of tuc_stack in ARM do_sigframe_return_v2, riku . voipio, 2016/09/22
- [Qemu-devel] [PULL 26/26] linux-user: fix TARGET_NR_select, riku . voipio, 2016/09/22
- Re: [Qemu-devel] [PULL 00/26] linux-user update, no-reply, 2016/09/22