From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2IeD-0008Vl-CH for qemu-devel@nongnu.org; Wed, 02 Jul 2014 07:24:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2Ie5-0000mt-T4 for qemu-devel@nongnu.org; Wed, 02 Jul 2014 07:24:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2Ie5-0000mm-Ke for qemu-devel@nongnu.org; Wed, 02 Jul 2014 07:24:13 -0400 Message-ID: <53B3EBD0.8080701@redhat.com> Date: Wed, 02 Jul 2014 13:24:00 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1404291017-7456-1-git-send-email-arei.gonglei@huawei.com> <53B3CB04.5040909@redhat.com> <53B3CFB8.5000800@huawei.com> <53B3D011.9000200@redhat.com> <33183CC9F5247A488A2544077AF1902086C18093@SZXEMA503-MBS.china.huawei.com> <53B3DBFD.1090009@redhat.com> <53B3E92E.1040909@huawei.com> In-Reply-To: <53B3E92E.1040909@huawei.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ide: fix double free List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ChenLiang Cc: "kwolf@redhat.com" , "Gonglei (Arei)" , "Huangweidong (C)" , "qemu-devel@nongnu.org" , "stefanha@redhat.com" Il 02/07/2014 13:12, ChenLiang ha scritto: > This patch avoid freeing dbs by dma_complete when dma_aio_cancel is running. > Because dma_complete also will be called by dma_bdrv_cb. So double free > will never happen. Yes, you already said that. But I'm not sure _why_ the patch avoids freeing dbs, especially since the patch adds a free in dma_aio_cancel itself. My patch shouldn't have any effect. Where is my analysis of it wrong? Paolo