Skip to content

Commit

Permalink
vnc: qemu can die if the client is disconnected while updating screen
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
  • Loading branch information
iksaif authored and Anthony Liguori committed Feb 4, 2011
1 parent 7185f93 commit 73eb4c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/vnc-jobs-async.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ static int vnc_worker_thread_loop(VncJobQueue *queue)

if (job->vs->csock == -1) {
vnc_unlock_display(job->vs->vd);
/* output mutex must be locked before going to
* disconnected:
*/
vnc_lock_output(job->vs);
goto disconnected;
}

Expand Down

0 comments on commit 73eb4c0

Please sign in to comment.