[Intel-gfx] [PATCH] drm/i915/gt: Do not add same i915_request to intel_context twice
dong.yang at intel.com
dong.yang at intel.com
Fri Dec 10 01:31:47 UTC 2021
From: "Yang, Dong" <dong.yang at intel.com>
With unknow race condition, the i915_request will be added
to intel_context list twice, and result in system panic.
If node alreay exist then do not add it again.
Signed-off-by: Yang, Dong <dong.yang at intel.com>
---
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
index 209cf265bf74..9c7bc060d2ae 100644
--- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
@@ -387,6 +387,9 @@ static void insert_breadcrumb(struct i915_request *rq)
}
}
+ if (&rq->signal_link == pos)
+ return;
+
i915_request_get(rq);
list_add_rcu(&rq->signal_link, pos);
GEM_BUG_ON(!check_signal_order(ce, rq));
--
2.27.0
More information about the Intel-gfx
mailing list