From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIdxH-0003ME-Oj for qemu-devel@nongnu.org; Mon, 11 Jan 2016 10:00:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIdxG-0004gZ-T9 for qemu-devel@nongnu.org; Mon, 11 Jan 2016 10:00:23 -0500 Date: Mon, 11 Jan 2016 16:00:13 +0100 From: Kevin Wolf Message-ID: <20160111150013.GB9454@noname.redhat.com> References: <1452282511-4116-1-git-send-email-ppandit@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1452282511-4116-1-git-send-email-ppandit@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2] ide: ahci: reset ncq object to unused on error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: P J P Cc: Qinghao Tang , John Snow , qemu-devel@nongnu.org, qemu-block@nongnu.org, Prasad J Pandit Am 08.01.2016 um 20:48 hat P J P geschrieben: > From: Prasad J Pandit > > When processing NCQ commands, ACHI device emulation prepares a s/ACHI/AHCI/ Can you still fix this in your tree, John? Kevin > NCQ transfer object; To which an aio control block(aiocb) object > is assigned in 'execute_ncq_command'. In case, when the NCQ > command is invalid, the 'aiocb' object is not assigned, and NCQ > transfer object is left as 'used'. This leads to a use after > free kind of error in 'bdrv_aio_cancel_async' via 'ahci_reset_port'. > Reset NCQ transfer object to 'unused' to avoid it. > > Reported-by: Qinghao Tang > Signed-off-by: Prasad J Pandit