From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 6/6] uhci: fix uhci_async_cancel_all
Date: Wed, 20 Jun 2012 16:05:34 +0200 [thread overview]
Message-ID: <1340201134-21109-7-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1340201134-21109-1-git-send-email-kraxel@redhat.com>
We update the QTAILQ in the loop, thus we must use the SAFE version
to make sure we don't touch the queue struct after freeing it.
https://bugzilla.novell.com/show_bug.cgi?id=766310
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-uhci.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index 9871e24..2ebce04 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -292,10 +292,10 @@ static void uhci_async_cancel_device(UHCIState *s, USBDevice *dev)
static void uhci_async_cancel_all(UHCIState *s)
{
- UHCIQueue *queue;
+ UHCIQueue *queue, *nq;
UHCIAsync *curr, *n;
- QTAILQ_FOREACH(queue, &s->queues, next) {
+ QTAILQ_FOREACH_SAFE(queue, &s->queues, next, nq) {
QTAILQ_FOREACH_SAFE(curr, &queue->asyncs, next, n) {
uhci_async_unlink(curr);
uhci_async_cancel(curr);
--
1.7.1
next prev parent reply other threads:[~2012-06-20 14:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 14:05 [Qemu-devel] [PULL 0/6] usb patch queue Gerd Hoffmann
2012-06-20 14:05 ` [Qemu-devel] [PATCH 1/6] ehci: add live migration support Gerd Hoffmann
2012-06-20 14:05 ` [Qemu-devel] [PATCH 2/6] usb: restore USBDevice->attached on vmload Gerd Hoffmann
2012-06-20 14:05 ` [Qemu-devel] [PATCH 3/6] ehci: tracing improvements Gerd Hoffmann
2012-06-20 14:05 ` [Qemu-devel] [PATCH 4/6] usb-host: attach only to running guest Gerd Hoffmann
2012-06-20 14:05 ` [Qemu-devel] [PATCH 5/6] usb-host: live migration support Gerd Hoffmann
2012-06-20 14:05 ` Gerd Hoffmann [this message]
2012-08-08 17:35 ` [Qemu-devel] [PATCH 6/6] uhci: fix uhci_async_cancel_all Bruce Rogers
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=1340201134-21109-7-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).