[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] virtio-serial: Fix segfault on guest boot
From: |
Amit Shah |
Subject: |
Re: [Qemu-devel] [PATCH v2] virtio-serial: Fix segfault on guest boot |
Date: |
Tue, 28 Jun 2011 14:42:25 +0530 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On (Wed) 22 Jun 2011 [09:53:35], Luiz Capitulino wrote:
> On Wed, 22 Jun 2011 09:49:22 +0530
> Amit Shah <address@hidden> 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