summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-03-21 17:08:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-26 12:02:02 +0300
commitc53f225fd792970c75ce0cb4042a11d04ef06d09 (patch)
tree0d8a8397849d92bd10ecf86304670a0db3e26438
parent325abf3db041d7ca130a5f84024da2ffffa35f0e (diff)
downloadlinux-c53f225fd792970c75ce0cb4042a11d04ef06d09.tar.xz
drm/i915/gvt: throw error on unhandled vfio ioctls
commit 9f591ae60e1be026901398ef99eede91237aa3a1 upstream. On unknown/unhandled ioctls the driver should return an error, so userspace knows it tried to use something unsupported. Cc: stable@vger.kernel.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/i915/gvt/kvmgt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
index 83e88c70272a..9bf4045cd679 100644
--- a/drivers/gpu/drm/i915/gvt/kvmgt.c
+++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
@@ -1153,7 +1153,7 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd,
return 0;
}
- return 0;
+ return -ENOTTY;
}
static ssize_t