[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/76] cpus: ignore ESRCH in qemu_cpu_kick_thread()
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 10/76] cpus: ignore ESRCH in qemu_cpu_kick_thread() |
Date: |
Tue, 5 Feb 2019 19:14:20 +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 v2 00/76] misc patches for 2019-02-04, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 01/76] vhost-user-test: use g_cond_broadcast, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 06/76] tap: flush STDOUT on newline, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 02/76] vhost-user-test: signal data_cond when s->rings changes, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 07/76] cpu-exec: add assert_no_pages_locked() after longjmp, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 23/76] i386: remove the 'INTEL_PT' CPUID bit from named CPU models, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 10/76] cpus: ignore ESRCH in qemu_cpu_kick_thread(),
Paolo Bonzini <=
- [Qemu-devel] [PULL 08/76] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 03/76] vhost-user-test: support VHOST_USER_PROTOCOL_F_CROSS_ENDIAN, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 22/76] i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 20/76] optionrom/pvh: load initrd from fw_cfg, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 13/76] pvh: Add x86/HVM direct boot ABI header file, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 09/76] configure: Add a proper check for openpty() in libutil, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 15/76] pvh: load initrd and expose it through fw_cfg, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 24/76] Revert "i386: Add CPUID bit for PCONFIG", Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 19/76] hw/i386/pc: use PVH option rom, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 26/76] contrib/elf2dmp: fix elf.h including, Paolo Bonzini, 2019/02/05