summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2015-07-17 15:32:03 +0200
committerLuis Henriques <luis.henriques@canonical.com>2015-08-25 10:13:39 +0100
commitc433ad7a9131631517880c74d6415473b2103f0d (patch)
tree84d668fca872a98fc64a90799d90fbb98b392923
parenta4f614d550100928d134eb230e5e5949e48173f5 (diff)
downloadlinux-stable-c433ad7a9131631517880c74d6415473b2103f0d.tar.gz
linux-stable-c433ad7a9131631517880c74d6415473b2103f0d.tar.bz2
linux-stable-c433ad7a9131631517880c74d6415473b2103f0d.zip
vhost: actually track log eventfd file
commit 7932c0bd7740f4cd2aa168d3ce0199e7af7d72d5 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: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
-rw-r--r--drivers/vhost/vhost.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index c90f4374442a..1fe2c8115be0 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -882,6 +882,7 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
}
if (eventfp != d->log_file) {
filep = d->log_file;
+ d->log_file = eventfp;
ctx = d->log_ctx;
d->log_ctx = eventfp ?
eventfd_ctx_fileget(eventfp) : NULL;