From patchwork Fri Aug 31 14:19:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 180978 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C83182C0092 for ; Sat, 1 Sep 2012 00:20:02 +1000 (EST) Received: from localhost ([::1]:49071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7S4m-0004pt-Nv for incoming@patchwork.ozlabs.org; Fri, 31 Aug 2012 10:20:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7S4F-0004Cy-6c for qemu-devel@nongnu.org; Fri, 31 Aug 2012 10:19:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T7S4E-0000Pj-9o for qemu-devel@nongnu.org; Fri, 31 Aug 2012 10:19:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7S4E-0000PS-0i for qemu-devel@nongnu.org; Fri, 31 Aug 2012 10:19:26 -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 q7VEJPWU001451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 31 Aug 2012 10:19:25 -0400 Received: from rincewind.home.kraxel.org (ovpn-116-61.ams2.redhat.com [10.36.116.61]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q7VEJOwu009472; Fri, 31 Aug 2012 10:19:24 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id BED1D43A8A; Fri, 31 Aug 2012 16:19:23 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 31 Aug 2012 16:19:15 +0200 Message-Id: <1346422762-15877-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1346422762-15877-1-git-send-email-kraxel@redhat.com> References: <1346422762-15877-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Hans de Goede Subject: [Qemu-devel] [PATCH for-1.2 04/11] ehci: Fix NULL ptr deref when unplugging an USB dev with an iso stream active X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Hans de Goede Signed-off-by: Hans de Goede --- hw/usb/hcd-ehci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index f43d690..a3aea6d 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1598,7 +1598,7 @@ static int ehci_process_itd(EHCIState *ehci, dev = ehci_find_device(ehci, devaddr); ep = usb_ep_get(dev, pid, endp); - if (ep->type == USB_ENDPOINT_XFER_ISOC) { + if (ep && ep->type == USB_ENDPOINT_XFER_ISOC) { usb_packet_setup(&ehci->ipacket, pid, ep, addr); usb_packet_map(&ehci->ipacket, &ehci->isgl); ret = usb_handle_packet(dev, &ehci->ipacket);