Skip to content

Commit 3767ca4

Browse files
ashutoshxThomas Hellström
authored andcommitted
drm/xe/eustall: Disallow 0 EU stall property values
An EU stall property value of 0 is invalid and will cause a NPD. Reported-by: Peter Senna Tschudin <peter.senna@linux.intel.com> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6453 Fixes: 1537ec8 ("drm/xe/uapi: Introduce API for EU stall sampling") Cc: stable@vger.kernel.org Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Harish Chegondi <harish.chegondi@intel.com> Link: https://patch.msgid.link/20251212061850.1565459-4-ashutosh.dixit@intel.com (cherry picked from commit 5bf763e) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
1 parent 3595114 commit 3767ca4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/xe/xe_eu_stall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static int xe_eu_stall_user_ext_set_property(struct xe_device *xe, u64 extension
315315
return -EFAULT;
316316

317317
if (XE_IOCTL_DBG(xe, ext.property >= ARRAY_SIZE(xe_set_eu_stall_property_funcs)) ||
318-
XE_IOCTL_DBG(xe, ext.pad))
318+
XE_IOCTL_DBG(xe, !ext.property) || XE_IOCTL_DBG(xe, ext.pad))
319319
return -EINVAL;
320320

321321
idx = array_index_nospec(ext.property, ARRAY_SIZE(xe_set_eu_stall_property_funcs));

0 commit comments

Comments
 (0)