diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2017-10-09 06:54:44 -0400 |
---|---|---|
committer | Konsta Holtta <kholtta@nvidia.com> | 2017-10-10 02:20:58 -0400 |
commit | 04350c209d8b4131ec31ad43bbcc120250129f96 (patch) | |
tree | 799128ac753f55caa1660a62b7be7e4bbe5d5fe6 /drivers/gpu | |
parent | ce12d5e0fe0fb9472c1862c6eaac436bb2f70669 (diff) |
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 <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1575279
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/gmmu.c | 1 |
1 files changed, 0 insertions, 1 deletions
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, | |||
527 | if (space_to_skip && | 527 | if (space_to_skip && |
528 | space_to_skip >= nvgpu_sgt_get_length(sgt, sgl)) { | 528 | space_to_skip >= nvgpu_sgt_get_length(sgt, sgl)) { |
529 | space_to_skip -= nvgpu_sgt_get_length(sgt, sgl); | 529 | space_to_skip -= nvgpu_sgt_get_length(sgt, sgl); |
530 | sgl = nvgpu_sgt_get_next(sgt, sgl); | ||
531 | continue; | 530 | continue; |
532 | } | 531 | } |
533 | 532 | ||