From: Gerd Hoffmann Date: Wed, 21 Mar 2018 14:08:47 +0000 (+0100) Subject: drm/i915/gvt: throw error on unhandled vfio ioctls X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9f591ae60e1be026901398ef99eede91237aa3a1;p=linux.git drm/i915/gvt: throw error on unhandled vfio ioctls 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 Reviewed-by: Alex Williamson Signed-off-by: Zhenyu Wang --- diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 520fe3d0a8823..f8540cc67b44c 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c @@ -1254,7 +1254,7 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd, } - return 0; + return -ENOTTY; } static ssize_t