From 04350c209d8b4131ec31ad43bbcc120250129f96 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Mon, 9 Oct 2017 13:54:44 +0300 Subject: gpu: nvgpu: fix double iteration in gmmu update __nvgpu_gmmu_do_update_page_table() uses nvgpu_sgt_for_each_sgl to loop through the entries of a buffer to be mapped, so when continue is used, the sgl entry must not be reassigned again like it was before with a pure while-and-update loop. Delete a reassignment to fix a case where sgl = sgl->next could happen twice. Bug 2002279 Bug 2001466 Change-Id: I47c8b853d4b35304740cd4e8a840df02fcd23054 Signed-off-by: Konsta Holtta Reviewed-on: https://git-master.nvidia.com/r/1575279 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Alex Waterman Reviewed-by: Terje Bergstrom Tested-by: Alex Waterman Reviewed-by: Timo Alho --- drivers/gpu/nvgpu/common/mm/gmmu.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/gpu/nvgpu/common/mm') diff --git a/drivers/gpu/nvgpu/common/mm/gmmu.c b/drivers/gpu/nvgpu/common/mm/gmmu.c index b802cb53..f61ec3fc 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu.c @@ -527,7 +527,6 @@ static int __nvgpu_gmmu_do_update_page_table(struct vm_gk20a *vm, if (space_to_skip && space_to_skip >= nvgpu_sgt_get_length(sgt, sgl)) { space_to_skip -= nvgpu_sgt_get_length(sgt, sgl); - sgl = nvgpu_sgt_get_next(sgt, sgl); continue; } -- cgit v1.2.2