mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: fix null access in page table allocation
Check entry->mem.sgt for validity before attempting to dereference it in a debug print. Bug 1809939 Change-Id: If7aa7444c162a076d8f23a88dfd2e3e0a9c33813 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1215522 (cherry picked from commit 48c25cd4f1db9d5bb07847af4de29d8f369b52e3) Reviewed-on: http://git-master/r/1220547 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6029684eb0
commit
b700d3a040
@@ -1292,7 +1292,10 @@ static int gk20a_zalloc_gmmu_page_table(struct vm_gk20a *vm,
|
||||
|
||||
err = alloc_gmmu_pages(vm, order, entry);
|
||||
gk20a_dbg(gpu_dbg_pte, "entry = 0x%p, addr=%08llx, size %d",
|
||||
entry, g->ops.mm.get_iova_addr(g, entry->mem.sgt->sgl, 0),
|
||||
entry,
|
||||
entry->mem.sgt ?
|
||||
g->ops.mm.get_iova_addr(g, entry->mem.sgt->sgl, 0)
|
||||
: 0,
|
||||
order);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user