qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] vhost-user: don't poke at chardev internal Q


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH v2] vhost-user: don't poke at chardev internal QemuOpts
Date: Fri, 7 Oct 2016 11:22:29 +0100
User-agent: Mutt/1.7.0 (2016-08-17)

On Fri, Oct 07, 2016 at 10:59:09AM +0100, Peter Maydell wrote:
> On 7 October 2016 at 10:49, Daniel P. Berrange <address@hidden> wrote:
> > The vhost-user code is poking at the QemuOpts instance
> > in the CharDriverState struct, not realizing that it is
> > valid for this to be NULL. e.g. the following crash
> > shows a codepath where it will be NULL:
> 
> > +typedef enum {
> > +    /* Whether the chardev acts as a network server and can
> > +     * thus support qemu_chr_wait_connected() to wait for
> > +     * incoming clients */
> > +    QEMU_CHAR_FEATURE_NETWORK_SERVER,
> > +    /* Whether it is possible to send/recv file descriptors
> > +     * over the data channel */
> > +    QEMU_CHAR_FEATURE_FD_PASS,
> > +
> > +    QEMU_CHAR_FEATURE_LAST,
> > +} CharDriverFeature;
> 
> Will net/colo-compare.c need more features than this, or
> will these suffice for both?

Oh, I didn't notice that colo did the same nasty thing. I'm not actually
seeing why colo wants to force a particular chardev backend - at first
glance it does not appear to be using features that rely on a particular
backend, in the way that vhost-user does. So maybe its sufficient to just
kill the checks in colo.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]