From 75e7ac70ec2f467387a6214e3bb0037893ddce76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Winiarski?= Date: Wed, 24 Jun 2026 13:14:21 +0200 Subject: [PATCH] drm/xe: Reject duplicated properties for EXEC_QUEUE_SET_PROPERTY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All of the properties are idempotent - setting them multiple times on the same exec_queue within a single IOCTL doesn't make sense. Return an error when duplicated property is found. Reviewed-by: Matthew Brost Link: https://patch.msgid.link/20260624111421.1258364-2-michal.winiarski@intel.com Signed-off-by: MichaƂ Winiarski --- drivers/gpu/drm/xe/xe_exec_queue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index cd053de3c6b5..9f3d022a1463 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -1121,6 +1121,9 @@ static int exec_queue_user_ext_set_property(struct xe_device *xe, if (!exec_queue_set_property_funcs[idx]) return -EINVAL; + if (XE_IOCTL_DBG(xe, *properties & BIT_ULL(idx))) + return -EINVAL; + *properties |= BIT_ULL(idx); err = exec_queue_user_ext_check(q, *properties); if (XE_IOCTL_DBG(xe, err))