* [PATCH] drm/ttm: Initialize local lists in ttm_bo_bulk_move_helper
@ 2018-08-28 16:58 Michel Dänzer
2018-08-29 7:13 ` Christian König
0 siblings, 1 reply; 2+ messages in thread
From: Michel Dänzer @ 2018-08-28 16:58 UTC (permalink / raw)
To: dri-devel
From: Michel Dänzer <michel.daenzer@amd.com>
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"
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
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 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);
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.18.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/ttm: Initialize local lists in ttm_bo_bulk_move_helper
2018-08-28 16:58 [PATCH] drm/ttm: Initialize local lists in ttm_bo_bulk_move_helper Michel Dänzer
@ 2018-08-29 7:13 ` Christian König
0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2018-08-29 7:13 UTC (permalink / raw)
To: Michel Dänzer, dri-devel
Am 28.08.2018 um 18:58 schrieb Michel Dänzer:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> 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"
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> 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 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);
> 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;
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-29 7:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 16:58 [PATCH] drm/ttm: Initialize local lists in ttm_bo_bulk_move_helper Michel Dänzer
2018-08-29 7:13 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.