From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Corentin Chary <corentincj@iksaif.net>,
qemu-devel@nongnu.org, patches@linaro.org
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 [thread overview]
Message-ID: <508019E6.7070807@redhat.com> (raw)
In-Reply-To: <1350570527-24187-1-git-send-email-peter.maydell@linaro.org>
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 <peter.maydell@linaro.org>
> ---
> Seems the easiest way to deal with this bug spotted via code
> inspection :-)
next prev parent reply other threads:[~2012-10-18 15:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 14:28 [Qemu-devel] [PATCH] ui/vnc-jobs: Delete unused and buggy vnc_stop_worker_thread() Peter Maydell
2012-10-18 15:01 ` Paolo Bonzini [this message]
2012-10-18 15:12 ` Peter Maydell
2012-10-18 15:36 ` Paolo Bonzini
2012-10-18 15:45 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=508019E6.7070807@redhat.com \
--to=pbonzini@redhat.com \
--cc=corentincj@iksaif.net \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.