From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsSIY-00066a-P0 for qemu-devel@nongnu.org; Fri, 07 Oct 2016 06:22:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsSIT-0001GL-TW for qemu-devel@nongnu.org; Fri, 07 Oct 2016 06:22:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsSIT-0001GD-MF for qemu-devel@nongnu.org; Fri, 07 Oct 2016 06:22:33 -0400 Date: Fri, 7 Oct 2016 11:22:29 +0100 From: "Daniel P. Berrange" Message-ID: <20161007102229.GH26332@redhat.com> Reply-To: "Daniel P. Berrange" References: <1475833793-8542-1-git-send-email-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v2] vhost-user: don't poke at chardev internal QemuOpts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , "Michael S. Tsirkin" , Michal Privoznik , Markus Armbruster , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Paolo Bonzini On Fri, Oct 07, 2016 at 10:59:09AM +0100, Peter Maydell wrote: > On 7 October 2016 at 10:49, Daniel P. Berrange 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/ :|