Commit 9a0a3beb authored by Chris Wilson's avatar Chris Wilson Committed by Rodrigo Vivi

drm/i915: Add a couple of missing i915_active_fini()

We use i915_active_fini() as a debug check on the i915_active state
before freeing. If we forget to call it, we may end up angering the
debugobjects contained within.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarThomas Hellström <thomas.hellstrom@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200731085015.32368-1-chris@chris-wilson.co.ukSigned-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent a22b1a9b
...@@ -232,6 +232,8 @@ static void frontbuffer_release(struct kref *ref) ...@@ -232,6 +232,8 @@ static void frontbuffer_release(struct kref *ref)
RCU_INIT_POINTER(obj->frontbuffer, NULL); RCU_INIT_POINTER(obj->frontbuffer, NULL);
spin_unlock(&to_i915(obj->base.dev)->fb_tracking.lock); spin_unlock(&to_i915(obj->base.dev)->fb_tracking.lock);
i915_active_fini(&front->write);
i915_gem_object_put(obj); i915_gem_object_put(obj);
kfree_rcu(front, rcu); kfree_rcu(front, rcu);
} }
......
...@@ -47,7 +47,10 @@ static int pulse_active(struct i915_active *active) ...@@ -47,7 +47,10 @@ static int pulse_active(struct i915_active *active)
static void pulse_free(struct kref *kref) static void pulse_free(struct kref *kref)
{ {
kfree(container_of(kref, struct pulse, kref)); struct pulse *p = container_of(kref, typeof(*p), kref);
i915_active_fini(&p->active);
kfree(p);
} }
static void pulse_put(struct pulse *p) static void pulse_put(struct pulse *p)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment