drm/i915/gvt: fix deadlock in dispatch_workload()'s error path
PATCH 1/1 drm/i915/gvt: fix deadlock in dispatch_workload()'s error path
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 <[email protected]>
Cc Zhenyu Wang <[email protected]>
Signed-off-by Eric Engestrom <[email protected]>
--- drivers/gpu/drm/i915/gvt/scheduler.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/gvt/scheduler.c +1 -0
@@ -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; }
Signature · 7 lines
Cheers, Eric _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Eric Engestrom
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 <[email protected]>Cc Zhenyu Wang <[email protected]>Signed-off-by Eric Engestrom <[email protected]>---
Hi, this has been fixed on https://cgit.freedesktop.org/drm/drm-intel/commit/?h=drm-intel-next-fixes&id=53d6f812c0dbf1c9cad89b1c2118e61c13ca9677
Thanks!
Quoted 19 lines
drivers/gpu/drm/i915/gvt/scheduler.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/i915/gvt/scheduler.c +1
-0@@ -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; }Signature · 2 lines
Cheers, Eric
Signature · 3 lines
Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel