[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/36] uhci: Properly unmap packets on cancel / inva
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 01/36] uhci: Properly unmap packets on cancel / invalid pid |
Date: |
Thu, 25 Oct 2012 14:51:34 +0200 |
From: Hans de Goede <address@hidden>
Packets with an invalid pid, or which were cancelled have
usb_packet_map() called on them on init, but not usb_packet_unmap()
before being freed.
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/hcd-uhci.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index c2f08e3..671c712 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -236,6 +236,7 @@ static void uhci_async_cancel(UHCIAsync *async)
trace_usb_uhci_packet_cancel(async->queue->token, async->td, async->done);
if (!async->done)
usb_cancel_packet(&async->packet);
+ usb_packet_unmap(&async->packet, &async->sgl);
uhci_async_free(async);
}
@@ -887,6 +888,7 @@ static int uhci_handle_td(UHCIState *s, uint32_t addr,
UHCI_TD *td,
default:
/* invalid pid : frame interrupted */
+ usb_packet_unmap(&async->packet, &async->sgl);
uhci_async_free(async);
s->status |= UHCI_STS_HCPERR;
uhci_update_irq(s);
--
1.7.1
- [Qemu-devel] [PATCH 02/36] uhci: Move checks to continue queuing to uhci_fill_queue(), (continued)
- [Qemu-devel] [PATCH 02/36] uhci: Move checks to continue queuing to uhci_fill_queue(), Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 20/36] uhci: Move emptying of the queue's asyncs' queue to uhci_queue_free, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 33/36] xhci: flush endpoint context unconditinally, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 10/36] usb: Rename __usb_packet_complete to usb_packet_complete_one, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 03/36] ehci: Get rid of packet tbytes field, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 29/36] uhci: Always mark a queue valid when we encounter it, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 18/36] uhci: Don't retry on error, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 11/36] usb: Add USB_RET_ADD_TO_QUEUE packet result code, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 08/36] ehci: Retry to fill the queue while waiting for td completion, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 15/36] usb: Enforce iso endpoints never returing USB_RET_ASYNC, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 01/36] uhci: Properly unmap packets on cancel / invalid pid,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 06/36] ehci: Speed up the timer of raising int from the async schedule, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 32/36] xhci: fix function name in error message, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 12/36] usb: Move clearing of queue on halt to the core, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 16/36] uhci: No need to handle async completion of isoc packets, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 34/36] xhci: allow disabling interrupters, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 21/36] uhci: Rename UHCIAsync->td to UHCIAsync->td_addr, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 28/36] uhci: When the guest marks a pending td non-active, cancel the queue, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 27/36] uhci: Detect guest td re-use, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 13/36] usb: Move short-not-ok handling to the core, Gerd Hoffmann, 2012/10/25
- [Qemu-devel] [PATCH 17/36] uhci: cleanup: Add an unlink call to uhci_async_cancel(), Gerd Hoffmann, 2012/10/25