From: dong.yang@intel.com
To: intel-gfx@lists.freedesktop.org
Cc: dong.yang@intel.com, Yang@freedesktop.org
Subject: [Intel-gfx] [PATCH] drm/i915/gt: Do not add same i915_request to intel_context twice
Date: Fri, 10 Dec 2021 09:31:47 +0800 [thread overview]
Message-ID: <20211210013147.2256699-1-dong.yang@intel.com> (raw)
From: "Yang, Dong" <dong.yang@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@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
next reply other threads:[~2021-12-10 1:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 1:31 dong.yang [this message]
2021-12-10 8:51 ` [Intel-gfx] [PATCH] drm/i915/gt: Do not add same i915_request to intel_context twice Tvrtko Ursulin
2021-12-13 1:53 ` Yang, Dong
2021-12-13 9:36 ` Tvrtko Ursulin
2021-12-14 5:58 ` Yang, Dong
2021-12-14 15:40 ` Tvrtko Ursulin
2021-12-10 11:00 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-12-10 11:31 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-12-11 4:59 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211210013147.2256699-1-dong.yang@intel.com \
--to=dong.yang@intel.com \
--cc=Yang@freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox