Received: from eggs.gnu.org ([2001:4830:134:3::10]:50362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHcX9-0001vQ-Qj for qemu-devel@nongnu.org; Fri, 08 Jan 2016 14:17:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHcX8-0000KW-Ut for qemu-devel@nongnu.org; Fri, 08 Jan 2016 14:17:11 -0500 Date: Sat, 9 Jan 2016 00:46:57 +0530 (IST) From: P J P In-Reply-To: <56900260.6030105@redhat.com> Message-ID: References: <1452254901-29796-1-git-send-email-ppandit@redhat.com> <56900260.6030105@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH] ide: ahci: reset ncq object to unused on error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: Qinghao Tang , qemu-devel@nongnu.org, qemu-block@nongnu.org +-- On Fri, 8 Jan 2016, John Snow wrote --+ | In both of these error pathways, AIOCB is actually never assigned to | begin with. True, it's mentioned in the commit message. | So it's not necessarily a use-after-free. Yes, right. | I think it should be safe to put ncq_tfs->used = 0 directly inside of | ncq_err, and that way we won't have any other error pathways omitting | this in the future. Okay, I'll send an updated patch. Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F