From patchwork Fri Mar 30 11:26:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 149629 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 BE68DB6FA2 for ; Fri, 30 Mar 2012 22:26:42 +1100 (EST) Received: from localhost ([::1]:39735 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDZyZ-0007Fk-Sm for incoming@patchwork.ozlabs.org; Fri, 30 Mar 2012 07:26:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDZyR-0007EA-3A for qemu-devel@nongnu.org; Fri, 30 Mar 2012 07:26:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDZyL-0002eK-Nr for qemu-devel@nongnu.org; Fri, 30 Mar 2012 07:26:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDZyL-0002eA-Fz for qemu-devel@nongnu.org; Fri, 30 Mar 2012 07:26:25 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2UBQNB4021425 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 30 Mar 2012 07:26:24 -0400 Received: from rincewind.home.kraxel.org (vpn1-6-225.ams2.redhat.com [10.36.6.225]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2UBQNfj016823; Fri, 30 Mar 2012 07:26:23 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 59B4C40AA6; Fri, 30 Mar 2012 13:26:22 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 30 Mar 2012 13:26:21 +0200 Message-Id: <1333106781-12978-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH] usb-ehci: drop assert() 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 Not sure what the purpose of the assert() was, in any case it is bogous. We can arrive there if transfer descriptors passed to us from the guest failed to pass sanity checks, i.e. it is guest-triggerable. We deal with that case by resetting the host controller. Everything is ok, no need to throw a core dump here. Signed-off-by: Gerd Hoffmann Acked-by: Hans de Goede --- hw/usb/hcd-ehci.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index e12f098..23631a4 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -2009,7 +2009,6 @@ static void ehci_advance_state(EHCIState *ehci, fprintf(stderr, "processing error - resetting ehci HC\n"); ehci_reset(ehci); again = 0; - assert(0); } } while (again);