Skip to content

Commit

Permalink
vhost: initialize log eventfd context pointer
Browse files Browse the repository at this point in the history
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 <quintela@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Michael S. Tsirkin committed Feb 28, 2010
1 parent 86e9424 commit 73a99f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/vhost/vhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 73a99f0

Please sign in to comment.