From 1bc3b3436f25a8a1de3dd336984dfaa014737a16 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 4 Sep 2014 16:08:29 +0300 Subject: gpu: nvgpu: Use pgsz_idx instead of page_size Alloc space writes the page size to a field that requires pgsz_idx. That can cause corruption in internal kernel structures. Clear_sparse treated a parameter as page size instead of index. Bug 1549451 Change-Id: I73ce17b99aae6865056facce72d2ab9ca8b3f81d Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/495692 --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 173776ff..9ab3ae88 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -2379,7 +2379,7 @@ int gk20a_vm_alloc_space(struct gk20a_as_share *as_share, va_node->vaddr_start = vaddr_start; va_node->size = (u64)args->page_size * (u64)args->pages; - va_node->pgsz_idx = args->page_size; + va_node->pgsz_idx = pgsz_idx; INIT_LIST_HEAD(&va_node->va_buffers_list); INIT_LIST_HEAD(&va_node->reserved_va_list); -- cgit v1.2.2