From: Michael S. Tsirkin Date: Tue, 23 Feb 2010 09:23:45 +0000 (+0200) Subject: vhost: initialize log eventfd context pointer X-Git-Tag: v2.6.34-rc1~233^2~10 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;h=73a99f083009d67d8e12603420e008d5c21b0b7d;p=net-next-2.6.git vhost: initialize log eventfd context pointer 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. When log_ctx for device is created, it is copied to the vq. This reset was missing. Reviewed-by: Juan Quintela Signed-off-by: Michael S. Tsirkin --- diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index db21518f7e8..6c31c0c9bbb 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,