From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUY11-0005Rv-SN for qemu-devel@nongnu.org; Tue, 02 Aug 2016 07:37:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUY0w-0003uY-VW for qemu-devel@nongnu.org; Tue, 02 Aug 2016 07:37:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUY0w-0003uN-Py for qemu-devel@nongnu.org; Tue, 02 Aug 2016 07:37:38 -0400 Message-ID: <1470137856.30562.92.camel@redhat.com> From: Gerd Hoffmann Date: Tue, 02 Aug 2016 13:37:36 +0200 In-Reply-To: <1469791051-680-3-git-send-email-jgross@suse.com> References: <1469791051-680-1-git-send-email-jgross@suse.com> <1469791051-680-3-git-send-email-jgross@suse.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/2] xen: drain submit queue in xen-usb before removing device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juergen Gross Cc: qemu-devel@nongnu.org, xen-devel@lists.xensource.com, sstabellini@kernel.org, anthony.perard@citrix.com On Fr, 2016-07-29 at 13:17 +0200, Juergen Gross wrote: > When unplugging a device in the Xen pvusb backend drain the submit > queue before deallocation of the control structures. Otherwise there > will be bogus memory accesses when I/O contracts are finished. >=20 > Correlated to this issue is the handling of cancel requests: a packet > cancelled will still lead to the call of complete, so add a flag > A =3D=3D=3D checkpatch complains =3D=3D=3D WARNING: braces {} are necessary for all arms of this statement #105: FILE: hw/usb/xen-usb.c:696: + if (sched) [...] WARNING: braces {} are necessary for all arms of this statement #111: FILE: hw/usb/xen-usb.c:702: + if (!usbif->ports[port - 1].attached) [...] WARNING: braces {} are necessary for all arms of this statement #152: FILE: hw/usb/xen-usb.c:847: + if (usbif->ports[i].dev) [...] cheers, Gerd