qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: mdroth@linux.vnet.ibm.com, Markus Armbruster <armbru@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-serial: Fix segfault on guest boot
Date: Sun, 19 Jun 2011 00:43:20 +0300	[thread overview]
Message-ID: <BANLkTinkCkpyP0JDWu5bhAT=XgFbo=ritQ@mail.gmail.com> (raw)
In-Reply-To: <20110618034245.GA26613@amit-x200.redhat.com>

On Sat, Jun 18, 2011 at 6:42 AM, Amit Shah <amit.shah@redhat.com> wrote:
> On (Fri) 17 Jun 2011 [15:08:11], Luiz Capitulino wrote:
>
>> > >          if (!cpkt.value) {
>> > > -            error_report("virtio-serial-bus: Guest failure in adding device %s\n",
>> > > -                         vser->bus.qbus.name);
>> > > -            break;
>> > > +            error_report("virtio-serial-bus: Guest failure in adding device %s\n", vser->bus.qbus.name);
>> > > +            return;
>> >
>> > The line split should remain -- else it goes beyond 80 chars.
>>
>> It's already beyond 80 chars to me.
>
> I prefer to not break strings that get printed out -- makes it easier
> for greppers to find out the source of the string.

Please read CODING_STYLE and use scripts/checkpatch.pl before
submitting patches.

>> > > @@ -346,8 +339,13 @@ static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len)
>> > >          QTAILQ_FOREACH(port, &vser->ports, next) {
>> > >              send_control_event(port, VIRTIO_CONSOLE_PORT_ADD, 1);
>> > >          }
>> > > -        break;
>> > > +        return;
>> > > +    }
>> >
>> > Makes me think of one case (totally unrelated to what you found)where
>> > the guest can fool us: by sending multiple VIRTIO_CONSOLE_DEVICE_READY
>> > messages.
>>
>> It will be handled just fine, no?
>
> We'll send out the VIRTIO_CONSOLE_PORT_ADD events for each port
> (again).  That's the case now.  No idea how the code might change in
> the future and we could end up doing something else in addition which
> might be bad.  Anyway, all this is for a buggy or a bad guest.
>
>                Amit
>
>

  reply	other threads:[~2011-06-18 21:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 16:38 [Qemu-devel] [PATCH] virtio-serial: Fix segfault on guest boot Luiz Capitulino
2011-06-17  6:47 ` Amit Shah
2011-06-17  7:47   ` Markus Armbruster
2011-06-17  8:44     ` Amit Shah
2011-06-17 13:16   ` Luiz Capitulino
2011-06-17 13:21     ` Luiz Capitulino
2011-06-17 16:09     ` Amit Shah
2011-06-17 18:08       ` Luiz Capitulino
2011-06-18  3:42         ` Amit Shah
2011-06-18 21:43           ` Blue Swirl [this message]
2011-06-22  4:53             ` Amit Shah
2011-06-26 17:43               ` Blue Swirl
2011-06-27  9:48                 ` [Qemu-devel] 80-column rule and breaking output statements Amit Shah
2011-07-01 19:43                   ` Blue Swirl
2011-07-02  8:38                     ` Stefan Hajnoczi
2011-07-04  6:05                       ` Amit Shah

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='BANLkTinkCkpyP0JDWu5bhAT=XgFbo=ritQ@mail.gmail.com' \
    --to=blauwirbel@gmail.com \
    --cc=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).