Skip to content

Commit

Permalink
drm/i915: Fix a use-after-free in intel_execlists_retire_requests
Browse files Browse the repository at this point in the history
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 6d3d827
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: Nick Hoath <nicholas.hoath@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Nick Hoath authored and Daniel Vetter committed Jan 30, 2015
1 parent ed6739e commit f821079
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_lrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit f821079

Please sign in to comment.