qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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
>
>

  parent reply	other threads:[~2012-08-06 13:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5017C8A0.60506@profihost.ag>
     [not found] ` <5017F19E.4070308@redhat.com>
     [not found]   ` <501817C9.6090405@profihost.ag>
     [not found]     ` <5018EC7D.9090702@redhat.com>
     [not found]       ` <5018F5BB.9070500@profihost.ag>
     [not found]         ` <5018F7E6.4020909@redhat.com>
     [not found]           ` <5018F9F6.70307@profihost.ag>
     [not found]             ` <5018FC9B.8040808@redhat.com>
     [not found]               ` <501E4615.7060801@profihost.ag>
     [not found]                 ` <501E4AFD.3020806@redhat.com>
     [not found]                   ` <501E96BB.5060702@profihost.ag>
     [not found]                     ` <501EC2E2.8010802@profihost.ag>
     [not found]                       ` <501F8226.9090500@redhat.com>
     [not found]                         ` <501F846C.50903@profihost.ag>
2012-08-06 12:12                           ` [Qemu-devel] KVM segfaults with 3.5 while installing ubuntu 12.04 Avi Kivity
2012-08-06 12:37                             ` Avi Kivity
2012-08-06 12:48                               ` Avi Kivity
2012-08-06 13:11                               ` Stefan Priebe - Profihost AG [this message]
2012-08-08  5:51                               ` Stefan Priebe
2012-08-08  8:06                                 ` Stefan Hajnoczi
2012-08-08  8:29                                   ` Stefan Priebe
2012-08-10 15:14                                     ` 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).