From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq5rY-000449-Tu for qemu-devel@nongnu.org; Fri, 30 Sep 2016 18:01:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bq5rY-0000uV-02 for qemu-devel@nongnu.org; Fri, 30 Sep 2016 18:01:00 -0400 From: John Snow Date: Fri, 30 Sep 2016 18:00:39 -0400 Message-Id: <1475272849-19990-2-git-send-email-jsnow@redhat.com> In-Reply-To: <1475272849-19990-1-git-send-email-jsnow@redhat.com> References: <1475272849-19990-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PATCH v2 01/11] blockjob: fix dead pointer in txn list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, famz@redhat.com, stefanha@redhat.com, jcody@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org, John Snow From: Vladimir Sementsov-Ogievskiy Though it is not intended to be reached through normal circumstances, if we do not gracefully deconstruct the transaction QLIST, we may wind up with stale pointers in the list. The rest of this series attempts to address the underlying issues, but this should fix list inconsistencies. Signed-off-by: Vladimir Sementsov-Ogievskiy Tested-by: John Snow Reviewed-by: John Snow [Rewrote commit message. --js] Signed-off-by: John Snow Reviewed-by: Eric Blake Signed-off-by: John Snow --- blockjob.c | 1 + 1 file changed, 1 insertion(+) diff --git a/blockjob.c b/blockjob.c index a167f96..13e7134 100644 --- a/blockjob.c +++ b/blockjob.c @@ -220,6 +220,7 @@ static void block_job_completed_single(BlockJob *job) } job->cb(job->opaque, job->ret); if (job->txn) { + QLIST_REMOVE(job, txn_list); block_job_txn_unref(job->txn); } block_job_unref(job); -- 2.7.4