Skip to content

Commit 9d0b2af

Browse files
BNieuwenhuizengregkh
authored andcommitted
drm/amdgpu: Validate VM ioctl flags.
commit a2b3080 upstream. None have been defined yet, so reject anybody setting any. Mesa sets it to 0 anyway. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent fe56f50 commit 9d0b2af

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,6 +2363,10 @@ int amdgpu_vm_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
23632363
long timeout = msecs_to_jiffies(2000);
23642364
int r;
23652365

2366+
/* No valid flags defined yet */
2367+
if (args->in.flags)
2368+
return -EINVAL;
2369+
23662370
switch (args->in.op) {
23672371
case AMDGPU_VM_OP_RESERVE_VMID:
23682372
/* We only have requirement to reserve vmid from gfxhub */

0 commit comments

Comments
 (0)