Received: from eggs.gnu.org ([2001:4830:134:3::10]:56954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIwiL-00075E-Hj for qemu-devel@nongnu.org; Mon, 09 Sep 2013 04:20:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VIwiF-00016w-IK for qemu-devel@nongnu.org; Mon, 09 Sep 2013 04:20:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIwiF-00016g-4N for qemu-devel@nongnu.org; Mon, 09 Sep 2013 04:20:47 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r898Kjmb020494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 9 Sep 2013 04:20:45 -0400 From: Hans de Goede Date: Mon, 9 Sep 2013 10:20:42 +0200 Message-Id: <1378714842-20500-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH] ehci: Fix crash with isoc usb packets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org The isoc packet path in the ehci code has a bad qobject cast, causing an abort, this patch fixes this. Note this problem is backported in 1.6.0 too, and this patch should be backported to the 1.6.0 stable tree. Signed-off-by: Hans de Goede --- hw/usb/hcd-ehci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 010a0d0..77c4872 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1486,7 +1486,8 @@ static int ehci_process_itd(EHCIState *ehci, return -1; } - qemu_sglist_init(&ehci->isgl, DEVICE(ehci), 2, ehci->as); + qemu_sglist_init(&ehci->isgl, BUS(&ehci->bus)->parent, + 2, ehci->as); if (off + len > 4096) { /* transfer crosses page border */ uint32_t len2 = off + len - 4096; -- 1.8.3.1