Re: [Qemu-devel] [PATCH] Make qemu_shutdown_requested signal-safe

2014-10-27 Thread Jan Kiszka
On 2014-10-27 10:09, Paolo Bonzini wrote: > On 10/26/2014 10:32 AM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> qemu_shutdown_requested may be interrupted by qemu_system_killed. >> If the latter sets shutdown_requested after qemu_shutdown_requested >> has read it but before it was cleared, the sh

Re: [Qemu-devel] [PATCH] Make qemu_shutdown_requested signal-safe

2014-10-27 Thread Paolo Bonzini
On 10/26/2014 10:32 AM, Jan Kiszka wrote: > From: Jan Kiszka > > qemu_shutdown_requested may be interrupted by qemu_system_killed. > If the latter sets shutdown_requested after qemu_shutdown_requested > has read it but before it was cleared, the shutdown event is lost. > Fix this by using atomic

Re: [Qemu-devel] [PATCH] Make qemu_shutdown_requested signal-safe

2014-10-26 Thread Gonglei
On 2014/10/26 17:32, Jan Kiszka wrote: > From: Jan Kiszka > > qemu_shutdown_requested may be interrupted by qemu_system_killed. If the > latter sets shutdown_requested after qemu_shutdown_requested has read it > but before it was cleared, the shutdown event is lost. Fix this by using > atomic_xc

[Qemu-devel] [PATCH] Make qemu_shutdown_requested signal-safe

2014-10-26 Thread Jan Kiszka
From: Jan Kiszka qemu_shutdown_requested may be interrupted by qemu_system_killed. If the latter sets shutdown_requested after qemu_shutdown_requested has read it but before it was cleared, the shutdown event is lost. Fix this by using atomic_xchg. Signed-off-by: Jan Kiszka --- vl.c | 4 +---