qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	mdroth@linux.vnet.ibm.com, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] virtio-serial: Fix segfault on guest boot
Date: Tue, 28 Jun 2011 14:42:25 +0530	[thread overview]
Message-ID: <20110628091225.GA2664@amit-x200.redhat.com> (raw)
In-Reply-To: <20110622095335.163b4950@doriath>

On (Wed) 22 Jun 2011 [09:53:35], Luiz Capitulino wrote:
> On Wed, 22 Jun 2011 09:49:22 +0530
> Amit Shah <amit.shah@redhat.com> wrote:

> > >  
> > > -    port = find_port_by_id(vser, ldl_p(&gcpkt->id));
> > > -    if (!port && cpkt.event != VIRTIO_CONSOLE_DEVICE_READY)
> > > -        return;
> > > -
> > > -    info = DO_UPCAST(VirtIOSerialPortInfo, qdev, port->dev.info);
> > > -
> > > -    switch(cpkt.event) {
> > > -    case VIRTIO_CONSOLE_DEVICE_READY:
> > > +    if (cpkt.event == VIRTIO_CONSOLE_DEVICE_READY) {
> > 
> > What we lose after this re-arrangement is the check that port is NULL
> > when this message is received.  i.e., a guest bug where port is set to
> > a valid value when this message arrives.  (I think I pointed this out
> > in a previous mail?)
> 
> I'm not sure I follow you here, the current code doesn't return if
> cpkt.event == VIRTIO_CONSOLE_DEVICE_READY:
> 
>     port = find_port_by_id(vser, ldl_p(&gcpkt->id));
>     if (!port && cpkt.event != VIRTIO_CONSOLE_DEVICE_READY)
>         return;

Ah; right.  Anyway it's a small thing, nothing to be worried about.

		Amit

      reply	other threads:[~2011-06-28  9:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 18:58 [Qemu-devel] [PATCH v2] virtio-serial: Fix segfault on guest boot Luiz Capitulino
2011-06-21 16:13 ` Markus Armbruster
2011-06-22  4:19 ` Amit Shah
2011-06-22 12:53   ` Luiz Capitulino
2011-06-28  9:12     ` Amit Shah [this message]

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=20110628091225.GA2664@amit-x200.redhat.com \
    --to=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /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).