From 25eef4214a43513c9166d8a99470b3a4d2220976 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Tue, 28 Aug 2018 18:56:29 +0200 Subject: [PATCH] drm/ttm: Initialize local lists in ttm_bo_bulk_move_helper MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher --- drivers/gpu/drm/ttm/ttm_bo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 39d9d55..35d53d8 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); static void ttm_bo_bulk_move_helper(struct ttm_lru_bulk_move_pos *pos, struct list_head *lru, bool is_swap) { - struct list_head entries, before; + LIST_HEAD(entries); + LIST_HEAD(before); struct list_head *list1, *list2; list1 = is_swap ? &pos->last->swap : &pos->last->lru; -- 2.7.4