aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2013-04-15 14:23:14 -0700
committerArve Hjønnevåg <arve@android.com>2013-04-29 14:43:24 -0700
commit2ab266e5724d4d1de0b67fff6e04409f856b1b3a (patch)
treec80fa3716ba8013f6fd89f9319ed828714e35bf3
parent6cbdea60b6acfaa6f578e5a50a556d51409425ab (diff)
downloadvexpress-lsk-2ab266e5724d4d1de0b67fff6e04409f856b1b3a.tar.gz
gpu: ion: fix kfree/list_del order
With CONFIG_SLUB_DEBUG_ON it would panic during ion_alloc() ion_buffer_create() io_heap_drain_freelist() Signed-off-by: JP Abgrall <jpa@google.com>
-rw-r--r--drivers/gpu/ion/ion.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/ion/ion.c b/drivers/gpu/ion/ion.c
index 200b1ad104a..d2d05139a2b 100644
--- a/drivers/gpu/ion/ion.c
+++ b/drivers/gpu/ion/ion.c
@@ -1342,8 +1342,8 @@ static bool ion_heap_drain_freelist(struct ion_heap *heap)
return false;
rt_mutex_lock(&heap->lock);
list_for_each_entry_safe(buffer, tmp, &heap->free_list, list) {
- _ion_buffer_destroy(buffer);
list_del(&buffer->list);
+ _ion_buffer_destroy(buffer);
}
BUG_ON(!list_empty(&heap->free_list));
rt_mutex_unlock(&heap->lock);