[PATCH] drm/xe/ufence: ufence can be signaled right after wait_woken

Nirmoy Das nirmoy.das at intel.com
Fri Oct 11 13:25:32 UTC 2024


do_comapre() can return success after wait_woken() which is treated as
-ETIME here.

Fixes: e670f0b4ef24 ("drm/xe/uapi: Return correct error code for xe_wait_user_fence_ioctl")
Cc: <stable at vger.kernel.org> # v6.8+
Cc: Bommu Krishnaiah <krishnaiah.bommu at intel.com>
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1630
Cc: Matthew Auld <matthew.auld at intel.com>
Cc: Matthew Brost <matthew.brost at intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
---
 drivers/gpu/drm/xe/xe_wait_user_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_wait_user_fence.c b/drivers/gpu/drm/xe/xe_wait_user_fence.c
index d46fa8374980..d532283d4aa3 100644
--- a/drivers/gpu/drm/xe/xe_wait_user_fence.c
+++ b/drivers/gpu/drm/xe/xe_wait_user_fence.c
@@ -169,7 +169,7 @@ int xe_wait_user_fence_ioctl(struct drm_device *dev, void *data,
 			args->timeout = 0;
 	}
 
-	if (!timeout && !(err < 0))
+	if (!timeout && err < 0)
 		err = -ETIME;
 
 	if (q)
-- 
2.46.0



More information about the Intel-xe mailing list