From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvV9X-0006kO-Us for qemu-devel@nongnu.org; Thu, 09 Feb 2012 09:39:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvV9L-0006BB-I4 for qemu-devel@nongnu.org; Thu, 09 Feb 2012 09:39:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvV9L-0006Ap-7N for qemu-devel@nongnu.org; Thu, 09 Feb 2012 09:39:03 -0500 Message-ID: <4F33DB54.7080707@redhat.com> Date: Thu, 09 Feb 2012 15:42:28 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1327962588-5230-1-git-send-email-agraf@suse.de> <1327962588-5230-2-git-send-email-agraf@suse.de> In-Reply-To: <1327962588-5230-2-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] AHCI: Fix port reset race List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Jan Kiszka , qemu-devel Developers Am 30.01.2012 23:29, schrieb Alexander Graf: > bdrv_aio_cancel() can trigger bdrv_aio_flush() which makes all aio > that is currently in flight finish. So what we do is: > > port reset > detect ncq in flight > cancel ncq > delete ncq sg list > > at which point we have double freed the sg list. Instead, with this > patch we do: > > port reset > detect ncq in flight > cancel ncq > check if we are really still in flight > delete ncq sg list > > which makes things work and gets rid of the race. > > Signed-off-by: Alexander Graf Thanks, applied to the block branch. Kevin