]> git.hungrycats.org Git - linux/commitdiff
drm/i915/gvt: throw error on unhandled vfio ioctls
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 21 Mar 2018 14:08:47 +0000 (15:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Apr 2018 09:00:37 +0000 (11:00 +0200)
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>
drivers/gpu/drm/i915/gvt/kvmgt.c

index 021f722e248165d461953999b02a7683d37dc7fa..f34d7f1e6c4ed736c3f094bc2d8a9154ab77453b 100644 (file)
@@ -1284,7 +1284,7 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd,
 
        }
 
-       return 0;
+       return -ENOTTY;
 }
 
 static ssize_t