forked from Minki/linux
drm/i915/buddy: avoid double list_add
Be careful not to mark an already free node as free again. 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/20200305204711.217783-1-matthew.auld@intel.com
This commit is contained in:
parent
520f835036
commit
f4b1b92f41
@ -312,6 +312,7 @@ i915_buddy_alloc(struct i915_buddy_mm *mm, unsigned int order)
|
||||
return block;
|
||||
|
||||
out_free:
|
||||
if (i != order)
|
||||
__i915_buddy_free(mm, block);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user