drm/syncobj: reject invalid flags in drm_syncobj_find_fence

The only flag that is meaningful to drm_syncobj_find_fence is
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT. It should return -EINVAL for any
other flag bits.

Signed-off-by: Erik Kurzinger <[email protected]>
Signed-off-by: Simon Ser <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Acked-by: Simon Ser <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
Erik Kurzinger authored and Simon Ser committed 2024-02-22 11:26:52 +01:00
1 parent 8c44ea8163
commit 18226ba521
1 file changed
+3
+3
View File
@@ -441,6 +441,9 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
u64 timeout = nsecs_to_jiffies64(DRM_SYNCOBJ_WAIT_FOR_SUBMIT_TIMEOUT);
int ret;
if (flags & ~DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT)
return -EINVAL;
if (!syncobj)
return -ENOENT;