[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/77] cpus: ignore ESRCH in qemu_cpu_kick_thread()
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 11/77] cpus: ignore ESRCH in qemu_cpu_kick_thread() |
Date: |
Mon, 4 Feb 2019 19:35:13 +0100 |
From: Laurent Vivier <address@hidden>
We can have a race condition between qemu_cpu_kick_thread() and
qemu_kvm_cpu_thread_fn() when we hotunplug a CPU. In this case,
qemu_cpu_kick_thread() can try to kick a thread that is exiting.
pthread_kill() returns an error and qemu is stopped by an exit(1).
qemu:qemu_cpu_kick_thread: No such process
We can ignore safely this error.
Signed-off-by: Laurent Vivier <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
cpus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpus.c b/cpus.c
index b09b702..154daf5 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1778,7 +1778,7 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
}
cpu->thread_kicked = true;
err = pthread_kill(cpu->thread->thread, SIG_IPI);
- if (err) {
+ if (err && err != ESRCH) {
fprintf(stderr, "qemu:%s: %s", __func__, strerror(err));
exit(1);
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/77] Misc patches for 2019-02-04, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 04/77] vhost-user-test: support VHOST_USER_PROTOCOL_F_CROSS_ENDIAN, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 10/77] configure: Add a proper check for openpty() in libutil, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 08/77] cpu-exec: add assert_no_pages_locked() after longjmp, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 06/77] vhost-user-test: reduce usage of global_qtest, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 07/77] tap: flush STDOUT on newline, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 11/77] cpus: ignore ESRCH in qemu_cpu_kick_thread(),
Paolo Bonzini <=
- [Qemu-devel] [PULL 03/77] vhost-user: support cross-endian vnet headers, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 05/77] vhost-user-test: skip if there is no memory at address 0, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 14/77] pvh: Add x86/HVM direct boot ABI header file, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 09/77] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 02/77] vhost-user-test: signal data_cond when s->rings changes, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 17/77] linuxboot_dma: remove duplicate definitions of FW_CFG, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 13/77] elf-ops.h: Add get_elf_note_type(), Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 20/77] hw/i386/pc: use PVH option rom, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 01/77] vhost-user-test: use g_cond_broadcast, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 29/77] contrib/elf2dmp: use GLib in PDB processing, Paolo Bonzini, 2019/02/04