From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REIt3-0002i2-DZ for qemu-devel@nongnu.org; Thu, 13 Oct 2011 06:51:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1REIt2-0001H2-3J for qemu-devel@nongnu.org; Thu, 13 Oct 2011 06:51:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REIt1-0001Gx-Q5 for qemu-devel@nongnu.org; Thu, 13 Oct 2011 06:51:39 -0400 Message-ID: <4E96C2C7.7060605@redhat.com> Date: Thu, 13 Oct 2011 12:51:51 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <20111010150341.35f19e79@BR8GGW75.de.ibm.com> <20111011093511.03741ed6@BR8GGW75.de.ibm.com> <20111012131720.11e8520f@BR8GGW75.de.ibm.com> In-Reply-To: <20111012131720.11e8520f@BR8GGW75.de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [BUG] USB assertion triggers in usb_packet_complete() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: Stefan Hajnoczi , qemu-devel@nongnu.org Hi, >> Hi Thomas, >> I hit the same bug recently and Gerd has posted a patch which you can test: >> http://patchwork.ozlabs.org/patch/118726/ > > Thanks for the hint, Stefan, you're right, that seems to be the same > bug. Your patch is working fine in my scenario, too. > > However, Gerd's patch is not working for me, the assertion still > triggers. It seems like usb_packet_complete() is called for the leaf > node before it is called for the hub node, so the leaf node already set > p->owner = NULL. Ah, right, on completion the call chain goes the other way around, so the usb_handle_packet() style approach doesn't fly. I think going with Stefans approach + a big fat comment is the best solution then. I'll go queue up a patch. cheers, Gerd