projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a6b7ef
)
drm/i915: i915_active.retire() is optional
author
Chris Wilson
<chris@chris-wilson.co.uk>
Mon, 19 Aug 2019 07:58:22 +0000
(08:58 +0100)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Mon, 19 Aug 2019 15:41:19 +0000
(16:41 +0100)
Check that i915_active.retire() exists before calling.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20190819075835.20065-6-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_active.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/i915_active.c
b/drivers/gpu/drm/i915/i915_active.c
index df6164591702295716368bb0f380fd7d483c521d..48e16ad93bbdd83c8a8df15dd49aa540655ad124 100644
(file)
--- a/
drivers/gpu/drm/i915/i915_active.c
+++ b/
drivers/gpu/drm/i915/i915_active.c
@@
-142,12
+142,14
@@
__active_retire(struct i915_active *ref)
if (!retire)
return;
- ref->retire(ref);
-
rbtree_postorder_for_each_entry_safe(it, n, &root, node) {
GEM_BUG_ON(i915_active_request_isset(&it->base));
kmem_cache_free(global.slab_cache, it);
}
+
+ /* After the final retire, the entire struct may be freed */
+ if (ref->retire)
+ ref->retire(ref);
}
static void