qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ui/vnc-jobs: Delete unused and buggy vnc_stop_w


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] ui/vnc-jobs: Delete unused and buggy vnc_stop_worker_thread()
Date: Thu, 18 Oct 2012 17:01:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

Il 18/10/2012 16:28, Peter Maydell ha scritto:
> The function vnc_stop_worker_thread() is buggy, beacuse it tries to
> delete jobs from the worker thread's queue but the worker thread itself
> will not cope with this happening (it would end up trying to remove
> an already-removed list item from its queue list). Fortunately
> nobody ever calls vnc_stop_worker_thread(), so we can fix this by
> simply deleting all the untested racy code.

Note that there is just one queue.  The queue global == the arg argument
of vnc_worker_thread == the queue argument of vnc_worker_thread_loop.
So I'm not sure I follow your reasoning.

So the bug may be that we never call vnc_stop_worker_thread from
vnc_disconnect_finish.  BTW vnc_jobs_join is called there so we could
just assert that the queue is empty...

Paolo

> Signed-off-by: Peter Maydell <address@hidden>
> ---
> Seems the easiest way to deal with this bug spotted via code
> inspection :-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]