drm/ttm: fix access to uninitialized variable.
Subsystems (3)
PATCH 1/1 drm/ttm: fix access to uninitialized variable.
The resource is not allocated yet, so no chance that this will work.
Use the placement instead.
Signed-off-by Christian König <[email protected]>
--- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_bo.c +1 -1
@@ -736,7 +736,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,struct ww_acquire_ctx *ticket;int ret; - man =ttm_manager_type (bdev, (*mem)->mem_type); + man =ttm_manager_type (bdev, place->mem_type); ticket =dma_resv_locking_ctx (bo->base.resv); do { ret = ttm_resource_alloc(bo, place, mem);
Signature · 1 line
2.25.1
Quoted 5 lines · Christian König
The resource is not allocated yet, so no chance that this will work.
Use the placement instead.
Signed-off-by Christian König <[email protected]>
Reviewed-by Thomas Hellström <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/ttm/ttm_bo.c +1
-1@@ -736,7 +736,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,struct ww_acquire_ctx *ticket;int ret; - man =ttm_manager_type (bdev, (*mem)->mem_type); + man =ttm_manager_type (bdev, place->mem_type); ticket =dma_resv_locking_ctx (bo->base.resv); do { ret = ttm_resource_alloc(bo, place, mem);
Reviewed-by Nirmoy Das <[email protected]>
Quoted 22 lines · Christian König
The resource is not allocated yet, so no chance that this will work.
Use the placement instead.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/ttm/ttm_bo.c +1
-1@@ -736,7 +736,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,struct ww_acquire_ctx *ticket;int ret; - man =ttm_manager_type (bdev, (*mem)->mem_type); + man =ttm_manager_type (bdev, place->mem_type); ticket =dma_resv_locking_ctx (bo->base.resv); do { ret = ttm_resource_alloc(bo, place, mem);