From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIfKU-0000ga-7m for qemu-devel@nongnu.org; Mon, 11 Jan 2016 11:28:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIfKQ-0004bx-Cn for qemu-devel@nongnu.org; Mon, 11 Jan 2016 11:28:26 -0500 References: <1452282511-4116-1-git-send-email-ppandit@redhat.com> <20160111150013.GB9454@noname.redhat.com> From: John Snow Message-ID: <5693D81F.20704@redhat.com> Date: Mon, 11 Jan 2016 11:28:15 -0500 MIME-Version: 1.0 In-Reply-To: <20160111150013.GB9454@noname.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Kevin Wolf , P J P Cc: Qinghao Tang , qemu-devel@nongnu.org, qemu-block@nongnu.org, Prasad J Pandit On 01/11/2016 10:00 AM, Kevin Wolf wrote: > 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 > Yes, thanks. >> 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 >