summary refs log tree commit diff stats
path: root/util/qemu-thread-posix.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2018-04-25 15:18:28 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2018-05-09 00:13:37 +0200
commit54961aac190df28d311802364d19e18d5cda8bab (patch)
tree58d44103a87300ad728e1befb701ae499a113277 /util/qemu-thread-posix.c
parentf056158d694d2adc63ff120ca71c73ae8b14426c (diff)
downloadfocaccia-qemu-54961aac190df28d311802364d19e18d5cda8bab.tar.gz
focaccia-qemu-54961aac190df28d311802364d19e18d5cda8bab.zip
cpus: tcg: fix never exiting loop on unplug
Commit 9b0605f9837b ("cpus: tcg: unregister thread with RCU, fix
exiting of loop on unplug") changed the exit condition of the loop in
the vCPU thread function but forgot to remove the beginning 'while (1)'
statement. The resulting code :

	while (1) {
	...
	} while (!cpu->unplug || cpu_can_run(cpu));

is a sequence of two distinct two while() loops, the first not exiting
in case of an unplug event.

Remove the first while (1) to fix CPU unplug.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20180425131828.15604-1-clg@kaod.org>
Cc: qemu-stable@nongnu.org
Fixes: 9b0605f9837b68fd56c7fc7c96a3a1a3b983687d
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'util/qemu-thread-posix.c')
0 files changed, 0 insertions, 0 deletions