public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Check return intel_context_timeline_lock of in eb_pin_timeline
@ 2022-01-04 17:31 Matthew Brost
  2022-01-04 23:05 ` John Harrison
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Brost @ 2022-01-04 17:31 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: daniele.ceraolospurio, john.c.harrison

intel_context_timeline_lock can return can error if interrupted by a
user when trying to lock the timeline mutex. Check the return value of
intel_context_timeline_lock in eb_pin_timeline (execbuf IOCTL).

Fixes: 544460c33821 ("drm/i915: Multi-BB execbuf")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index e9541244027a..65a078945b00 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -2517,6 +2517,9 @@ static int eb_pin_timeline(struct i915_execbuffer *eb, struct intel_context *ce,
 			i915_request_put(rq);
 
 			tl = intel_context_timeline_lock(ce);
+			if (IS_ERR(tl))
+				return PTR_ERR(tl);
+
 			intel_context_exit(ce);
 			intel_context_timeline_unlock(tl);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-04 23:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-04 17:31 [PATCH] drm/i915: Check return intel_context_timeline_lock of in eb_pin_timeline Matthew Brost
2022-01-04 23:05 ` John Harrison
2022-01-04 23:06   ` Matthew Brost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox