Commit c433ad7a authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Luis Henriques

vhost: actually track log eventfd file

commit 7932c0bd upstream.

While reviewing vhost log code, I found out that log_file is never
set. Note: I haven't tested the change (QEMU doesn't use LOG_FD yet).
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent a4f614d5
...@@ -882,6 +882,7 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp) ...@@ -882,6 +882,7 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
} }
if (eventfp != d->log_file) { if (eventfp != d->log_file) {
filep = d->log_file; filep = d->log_file;
d->log_file = eventfp;
ctx = d->log_ctx; ctx = d->log_ctx;
d->log_ctx = eventfp ? d->log_ctx = eventfp ?
eventfd_ctx_fileget(eventfp) : NULL; eventfd_ctx_fileget(eventfp) : NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment