aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-08-28 12:56:29 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-08-29 13:35:59 -0400
commit25eef4214a43513c9166d8a99470b3a4d2220976 (patch)
tree97a69f2de3d9b6c08ee7eb64e6341fcf25cc0946
parent5f232bd79b2417450064b78a9b3d398f9cd498ba (diff)
drm/ttm: Initialize local lists in ttm_bo_bulk_move_helper
The first parameter of list_cut_position() must point to an initialized list. Noticed thanks to KASAN pointing out something's fishy here. Fixes: "drm/ttm: add bulk move function on LRU" Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 39d9d559b279..35d53d81f486 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -250,7 +250,8 @@ EXPORT_SYMBOL(ttm_bo_move_to_lru_tail);
250static void ttm_bo_bulk_move_helper(struct ttm_lru_bulk_move_pos *pos, 250static void ttm_bo_bulk_move_helper(struct ttm_lru_bulk_move_pos *pos,
251 struct list_head *lru, bool is_swap) 251 struct list_head *lru, bool is_swap)
252{ 252{
253 struct list_head entries, before; 253 LIST_HEAD(entries);
254 LIST_HEAD(before);
254 struct list_head *list1, *list2; 255 struct list_head *list1, *list2;
255 256
256 list1 = is_swap ? &pos->last->swap : &pos->last->lru; 257 list1 = is_swap ? &pos->last->swap : &pos->last->lru;