Commit 90c8acce authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull vhost fixes from Michael Tsirkin:
 "Two bugfixes only here"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  vhost: fix error handling for memory region alloc
  vhost: actually track log eventfd file
parents 30b4f0fa 1e099473
...@@ -683,11 +683,8 @@ static void *vhost_kvzalloc(unsigned long size) ...@@ -683,11 +683,8 @@ static void *vhost_kvzalloc(unsigned long size)
{ {
void *n = kzalloc(size, GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT); void *n = kzalloc(size, GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT);
if (!n) { if (!n)
n = vzalloc(size); n = vzalloc(size);
if (!n)
return ERR_PTR(-ENOMEM);
}
return n; return n;
} }
...@@ -995,6 +992,7 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp) ...@@ -995,6 +992,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