mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
drm/i915/buddy: use kmemleak_update_trace
Since nodes are cached in a free-list, and potentially marked as free without actually being destroyed, thus allowing them to be opportunistically re-allocated, we should apply kmemleak_update_trace every time a node is given a new owner and marked as allocated, to aid in debugging. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190816105357.14340-2-matthew.auld@intel.com
This commit is contained in:
parent
665c1c2166
commit
3ba09632ce
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
* Copyright © 2019 Intel Corporation
|
||||
*/
|
||||
|
||||
#include <linux/kmemleak.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "i915_buddy.h"
|
||||
|
@ -304,6 +305,7 @@ i915_buddy_alloc(struct i915_buddy_mm *mm, unsigned int order)
|
|||
}
|
||||
|
||||
mark_allocated(block);
|
||||
kmemleak_update_trace(block);
|
||||
return block;
|
||||
|
||||
out_free:
|
||||
|
|
Loading…
Reference in a new issue