From: Stefan Priebe - Profihost AG <s.priebe@profihost.ag>
To: Avi Kivity <avi@redhat.com>
Cc: mtosatti@redhat.com, kvm@vger.kernel.org,
qemu-devel <qemu-devel@nongnu.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: Re: KVM segfaults with 3.5 while installing ubuntu 12.04
Date: Mon, 06 Aug 2012 15:11:53 +0200 [thread overview]
Message-ID: <501FC299.1050408@profihost.ag> (raw)
In-Reply-To: <501FBAA2.6050205@redhat.com>
can confirm - this fixed it!
Am 06.08.2012 14:37, schrieb Avi Kivity:
> On 08/06/2012 03:12 PM, Avi Kivity wrote:
>> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
>>
>>> But still i got the segfault and core dump - this is my main problem? I
>>> mean qemu-kvm master isn't declared as stable. So i don't care about the
>>> slowness here.
>>>
>>> What can we do about the core dump and crash?
>>
>> Okay, I reproduced it; it seems aio=native is the culprit. You can try
>> aio=threads as a workaround.
>>
>> Copying some relevant people (context: aio=native on qemu-kvm-1.1.1
>> segfaults pretty early during guest install)
>>
>
> The following ought to fix it:
>
>
> From: Avi Kivity <avi@redhat.com>
> Date: Mon, 6 Aug 2012 15:35:02 +0300
> Subject: [PATCH] virtio-mlk: fix use-after-free while handling scsi commands
>
> The scsi passthrough handler falls through after completing a
> request into the failure path, resulting in a use after free.
>
> Reprducible by running a guest with aio=native on a block device.
>
> Reported-by: Stefan Priebe <s.priebe@profihost.ag>
> Signed-off-by: Avi Kivity <avi@redhat.com>
>
> diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
> index f21757e..552b3b6 100644
> --- a/hw/virtio-blk.c
> +++ b/hw/virtio-blk.c
> @@ -254,6 +254,7 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
>
> virtio_blk_req_complete(req, status);
> g_free(req);
> + return;
> #else
> abort();
> #endif
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Stefan Priebe - Profihost AG <s.priebe@profihost.ag>
To: Avi Kivity <avi@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
kvm@vger.kernel.org, mtosatti@redhat.com,
qemu-devel <qemu-devel@nongnu.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [Qemu-devel] KVM segfaults with 3.5 while installing ubuntu 12.04
Date: Mon, 06 Aug 2012 15:11:53 +0200 [thread overview]
Message-ID: <501FC299.1050408@profihost.ag> (raw)
In-Reply-To: <501FBAA2.6050205@redhat.com>
can confirm - this fixed it!
Am 06.08.2012 14:37, schrieb Avi Kivity:
> On 08/06/2012 03:12 PM, Avi Kivity wrote:
>> On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote:
>>
>>> But still i got the segfault and core dump - this is my main problem? I
>>> mean qemu-kvm master isn't declared as stable. So i don't care about the
>>> slowness here.
>>>
>>> What can we do about the core dump and crash?
>>
>> Okay, I reproduced it; it seems aio=native is the culprit. You can try
>> aio=threads as a workaround.
>>
>> Copying some relevant people (context: aio=native on qemu-kvm-1.1.1
>> segfaults pretty early during guest install)
>>
>
> The following ought to fix it:
>
>
> From: Avi Kivity <avi@redhat.com>
> Date: Mon, 6 Aug 2012 15:35:02 +0300
> Subject: [PATCH] virtio-mlk: fix use-after-free while handling scsi commands
>
> The scsi passthrough handler falls through after completing a
> request into the failure path, resulting in a use after free.
>
> Reprducible by running a guest with aio=native on a block device.
>
> Reported-by: Stefan Priebe <s.priebe@profihost.ag>
> Signed-off-by: Avi Kivity <avi@redhat.com>
>
> diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
> index f21757e..552b3b6 100644
> --- a/hw/virtio-blk.c
> +++ b/hw/virtio-blk.c
> @@ -254,6 +254,7 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
>
> virtio_blk_req_complete(req, status);
> g_free(req);
> + return;
> #else
> abort();
> #endif
>
>
next prev parent reply other threads:[~2012-08-06 13:11 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 11:59 KVM segfaults with 3.5 while installing ubuntu 12.04 Stefan Priebe - Profihost AG
2012-07-31 14:54 ` Avi Kivity
2012-07-31 17:30 ` Stefan Priebe
2012-07-31 17:37 ` Stefan Priebe
2012-08-01 8:44 ` Avi Kivity
2012-08-01 9:24 ` Stefan Priebe - Profihost AG
2012-08-01 9:33 ` Avi Kivity
2012-08-01 9:42 ` Stefan Priebe - Profihost AG
2012-08-01 9:53 ` Avi Kivity
2012-08-01 11:29 ` Stefan Priebe - Profihost AG
2012-08-01 15:15 ` Avi Kivity
2012-08-05 10:08 ` Stefan Priebe
2012-08-05 10:29 ` Avi Kivity
2012-08-05 15:52 ` Stefan Priebe
2012-08-05 19:00 ` Stefan Priebe
2012-08-06 8:36 ` Avi Kivity
2012-08-06 8:46 ` Stefan Priebe - Profihost AG
2012-08-06 12:12 ` Avi Kivity
2012-08-06 12:12 ` [Qemu-devel] " Avi Kivity
2012-08-06 12:37 ` Avi Kivity
2012-08-06 12:37 ` [Qemu-devel] " Avi Kivity
2012-08-06 12:37 ` Avi Kivity
2012-08-06 12:48 ` Avi Kivity
2012-08-06 12:48 ` [Qemu-devel] " Avi Kivity
2012-08-06 12:48 ` Avi Kivity
2012-08-06 13:11 ` Stefan Priebe - Profihost AG [this message]
2012-08-06 13:11 ` [Qemu-devel] " Stefan Priebe - Profihost AG
2012-08-08 5:51 ` Stefan Priebe
2012-08-08 5:51 ` [Qemu-devel] " Stefan Priebe
2012-08-08 8:06 ` Stefan Hajnoczi
2012-08-08 8:06 ` [Qemu-devel] " Stefan Hajnoczi
2012-08-08 8:29 ` Stefan Priebe
2012-08-08 8:29 ` [Qemu-devel] " Stefan Priebe
2012-08-10 15:14 ` Stefan Hajnoczi
2012-08-10 15:14 ` [Qemu-devel] " Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=501FC299.1050408@profihost.ag \
--to=s.priebe@profihost.ag \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kwolf@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.