drm/xe/vm: Add missing pad and extensions check
Subsystems (2)
PATCH 1/1 drm/xe/vm: Add missing pad and extensions check
Add missing pad and extensions check to xe_vm_get_property_ioctl
Fixes 50c577eab051 ("drm/xe/xe_vm: Implement xe_vm_get_property_ioctl")
Suggested-by Matthew Auld <[email protected]>
Signed-off-by Jonathan Cavitt <[email protected]>
--- drivers/gpu/drm/xe/xe_vm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/xe/xe_vm.c +3 -0
@@ -4159,6 +4159,9 @@ int xe_vm_get_property_ioctl(struct drm_device *drm, void *data, args->reserved[2])))return -EINVAL ; +if (XE_IOCTL_DBG (xe, args->pad || args->extensions)) +return -EINVAL ; + vm =xe_vm_lookup (xef, args->vm_id);if (XE_IOCTL_DBG (xe, !vm))return -ENOENT ;
Signature · 1 line
2.43.0
Quoted 5 lines · Jonathan Cavitt
Add missing pad and extensions check to
xe_vm_get_property_ioctlFixes 50c577eab051 ("drm/xe/xe_vm: Implement xe_vm_get_property_ioctl")Suggested-by Matthew Auld <[email protected]>Signed-off-by Jonathan Cavitt <[email protected]>
Would it make sense to combine this with the other reserved checks?
Either way:
Reviewed-by Matthew Auld <[email protected]>
Quoted 18 lines
--- drivers/gpu/drm/xe/xe_vm.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/xe/xe_vm.c +3
-0@@ -4159,6 +4159,9 @@ int xe_vm_get_property_ioctl(struct drm_device *drm, void *data, args->reserved[2])))return -EINVAL ; +if (XE_IOCTL_DBG (xe, args->pad || args->extensions)) +return -EINVAL ; + vm =xe_vm_lookup (xef, args->vm_id);if (XE_IOCTL_DBG (xe, !vm))return -ENOENT ;