Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8210795 authored by Nick Hoath's avatar Nick Hoath Committed by Daniel Vetter
Browse files

drm/i915: Fix a use-after-free in intel_execlists_retire_requests



Remove request from list before unreferencing it, in case it's actually
the only reference. (Found by Tvrtko Ursulin)

This issue has been most likely introduced in

commit 6d3d8274
Author: Nick Hoath <nicholas.hoath@intel.com>
Date:   Thu Jan 15 13:10:39 2015 +0000

    drm/i915: Subsume intel_ctx_submit_request in to drm_i915_gem_request

Signed-off-by: default avatarNick Hoath <nicholas.hoath@intel.com>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent ed6739ef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -732,8 +732,8 @@ void intel_execlists_retire_requests(struct intel_engine_cs *ring)
			intel_lr_context_unpin(ring, ctx);
		intel_runtime_pm_put(dev_priv);
		i915_gem_context_unreference(ctx);
		i915_gem_request_unreference(req);
		list_del(&req->execlist_link);
		i915_gem_request_unreference(req);
	}
}