From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juan Quintela Subject: Re: [PATCH 2/3] vhost: initialize log eventfd context pointer Date: Tue, 23 Feb 2010 20:31:11 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Rusty Russell , kvm@vger.kernel.org, virtualization@lists.osdl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , markmc@redhat.com, gleb@redhat.com, herbert.xu@redhat.com, dlaor@redhat.com, avi@redhat.com To: "Michael S. Tsirkin" Return-path: In-Reply-To: (Michael S. Tsirkin's message of "Tue, 23 Feb 2010 18:57:51 +0200") Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org "Michael S. Tsirkin" wrote: > vq log eventfd context pointer needs to be initialized, otherwise > operation may fail or oops if log is enabled but log eventfd not set by > userspace. > > Signed-off-by: Michael S. Tsirkin Reviewed-by: Juan Quintela When log_ctx for device is created, it is copied to the vq. This reset was missing. > --- > drivers/vhost/vhost.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index c767279..d4f8fdf 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -121,6 +121,7 @@ static void vhost_vq_reset(struct vhost_dev *dev, > vq->kick = NULL; > vq->call_ctx = NULL; > vq->call = NULL; > + vq->log_ctx = NULL; > } > > long vhost_dev_init(struct vhost_dev *dev,