summaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-09 16:28:09 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-09 16:28:09 -0700
commit5d44f4b3484e85c8d4527ecaca5e536da774ae21 (patch)
tree5c699fd097844ecdf30ef9b47444064d713ac410 /drivers/vhost
parent4816693286d4ff9219b1cc72c2ab9c589448ebcb (diff)
parentf7644cbfcdf03528f0f450f3940c4985b2291f49 (diff)
downloadlinux-stable-5d44f4b3484e85c8d4527ecaca5e536da774ae21.tar.gz
linux-stable-5d44f4b3484e85c8d4527ecaca5e536da774ae21.tar.bz2
linux-stable-5d44f4b3484e85c8d4527ecaca5e536da774ae21.zip
Merge 4.2-rc6 into char-misc-next
We want the fixes in Linus's tree in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/vhost.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index a9fe859f43c8..eec2f11809ff 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -683,11 +683,8 @@ static void *vhost_kvzalloc(unsigned long size)
{
void *n = kzalloc(size, GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT);
- if (!n) {
+ if (!n)
n = vzalloc(size);
- if (!n)
- return ERR_PTR(-ENOMEM);
- }
return n;
}
@@ -995,6 +992,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;