diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/gmmu.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/gmmu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/gmmu.c b/drivers/gpu/nvgpu/common/mm/gmmu.c index 1eed3a3b..d6aaf8cd 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu.c | |||
@@ -828,6 +828,11 @@ static int __nvgpu_locate_pte(struct gk20a *g, struct vm_gk20a *vm, | |||
828 | if (!pd_next->mem) | 828 | if (!pd_next->mem) |
829 | return -EINVAL; | 829 | return -EINVAL; |
830 | 830 | ||
831 | attrs->pgsz = l->get_pgsz(g, pd, pd_idx); | ||
832 | |||
833 | if (attrs->pgsz >= gmmu_nr_page_sizes) | ||
834 | return -EINVAL; | ||
835 | |||
831 | return __nvgpu_locate_pte(g, vm, pd_next, | 836 | return __nvgpu_locate_pte(g, vm, pd_next, |
832 | vaddr, lvl + 1, attrs, | 837 | vaddr, lvl + 1, attrs, |
833 | data, pd_out, pd_idx_out, | 838 | data, pd_out, pd_idx_out, |