From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adxZ3-0003pn-7s for qemu-devel@nongnu.org; Thu, 10 Mar 2016 05:11:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adxYy-0003gC-4T for qemu-devel@nongnu.org; Thu, 10 Mar 2016 05:11:29 -0500 From: Alberto Garcia In-Reply-To: <56E0555F.9010704@redhat.com> References: <8ad83e37ec80ac89ee7a30426c4b0f2c02e033eb.1457539274.git.berto@igalia.com> <56E0555F.9010704@redhat.com> Date: Thu, 10 Mar 2016 11:10:48 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 1/4] quorum: Fix crash in quorum_aio_cb() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org On Wed 09 Mar 2016 05:54:55 PM CET, Max Reitz wrote: > On 09.03.2016 17:11, Alberto Garcia wrote: >> quorum_aio_cb() emits the QUORUM_REPORT_BAD event if there's >> an I/O error in a Quorum child. However sacb->aiocb must be >> correctly initialized for this to happen. read_quorum_children() and >> read_fifo_child() are not doing this, which results in a QEMU crash. >> >> Signed-off-by: Alberto Garcia >> --- >> block/quorum.c | 12 +++++++----- >> 1 file changed, 7 insertions(+), 5 deletions(-) > > Reviewed-by: Max Reitz > > Although I'm wondering whether we could have just used acb->common.bs > instead of sacb->aiocb->bs in quorum_aio_cb(). I guess that > sacb->aiocb is supposed to be equal to &acb->common. acb->common.bs is the Quorum BDS, sacb->aiocb->bs is the child BDS. Berto