vnc: qemu can die if the client is disconnected while updating screen
agraf reported that qemu_mutex_destroy(vs->output_mutex) while failing in vnc_disconnect_finish(). It's because vnc_worker_thread_loop() tries to unlock the mutex while not locked. The unlocking call doesn't fail (pthread bug ?), but the destroy call does. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
7185f9315b
commit
73eb4c04e9
|
@ -227,6 +227,10 @@ static int vnc_worker_thread_loop(VncJobQueue *queue)
|
||||||
|
|
||||||
if (job->vs->csock == -1) {
|
if (job->vs->csock == -1) {
|
||||||
vnc_unlock_display(job->vs->vd);
|
vnc_unlock_display(job->vs->vd);
|
||||||
|
/* output mutex must be locked before going to
|
||||||
|
* disconnected:
|
||||||
|
*/
|
||||||
|
vnc_lock_output(job->vs);
|
||||||
goto disconnected;
|
goto disconnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue