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 <quintela@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
86e9424d72
commit
73a99f0830
1 changed files with 1 additions and 0 deletions
|
@ -121,6 +121,7 @@ static void vhost_vq_reset(struct vhost_dev *dev,
|
||||||
vq->kick = NULL;
|
vq->kick = NULL;
|
||||||
vq->call_ctx = NULL;
|
vq->call_ctx = NULL;
|
||||||
vq->call = NULL;
|
vq->call = NULL;
|
||||||
|
vq->log_ctx = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
long vhost_dev_init(struct vhost_dev *dev,
|
long vhost_dev_init(struct vhost_dev *dev,
|
||||||
|
|
Loading…
Reference in a new issue