From: Eric Engestrom <eric@engestrom.ch>
To: linux-kernel@vger.kernel.org
Cc: Eric Engestrom <eric@engestrom.ch>,
Pei Zhang <pei.zhang@intel.com>,
Zhenyu Wang <zhenyuw@linux.intel.com>,
Zhi Wang <zhi.a.wang@intel.com>,
Daniel Vetter <daniel.vetter@intel.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
David Airlie <airlied@linux.ie>,
igvt-g-dev@ml01.01.org, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/i915/gvt: fix deadlock in dispatch_workload()'s error path
Date: Sun, 4 Dec 2016 23:57:18 +0000 [thread overview]
Message-ID: <20161204235718.1102-1-eric@engestrom.ch> (raw)
90d27a1 moved the lock before this error path but forgot to add an
unlock here.
Fixes: 90d27a1b180e51ef0713 ("drm/i915/gvt: fix deadlock in workload_thread")
Cc: Pei Zhang <pei.zhang@intel.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
---
drivers/gpu/drm/i915/gvt/scheduler.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
index f898df3..cd13c4b 100644
--- a/drivers/gpu/drm/i915/gvt/scheduler.c
+++ b/drivers/gpu/drm/i915/gvt/scheduler.c
@@ -177,6 +177,7 @@ static int dispatch_workload(struct intel_vgpu_workload *workload)
rq = i915_gem_request_alloc(dev_priv->engine[ring_id], shadow_ctx);
if (IS_ERR(rq)) {
gvt_err("fail to allocate gem request\n");
+ mutex_unlock(&dev_priv->drm.struct_mutex);
workload->status = PTR_ERR(rq);
return workload->status;
}
--
Cheers,
Eric
next reply other threads:[~2016-12-04 23:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-04 23:57 Eric Engestrom [this message]
2016-12-05 2:38 ` [PATCH] drm/i915/gvt: fix deadlock in dispatch_workload()'s error path Zhenyu Wang
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=20161204235718.1102-1-eric@engestrom.ch \
--to=eric@engestrom.ch \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=igvt-g-dev@ml01.01.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pei.zhang@intel.com \
--cc=zhenyuw@linux.intel.com \
--cc=zhi.a.wang@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).