gpu: nvgpu: set id on MMU fault for unbound ch

Currently, gv11b_mm_mmu_fault_handle_mmu_fault_refch does not
set id when MMU fault occurs for a referenceable channel which
is not bound to TSG.

This can later on result in a crash when attempting to access
related channel context, using this unitialized id.

Jira NVGPU-4511

Change-Id: Ic8885ec89076cf8cc6c2b641f4a85e766d4b536a
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2264860
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Thomas Fleury
2019-12-18 09:05:06 -05:00
committed by Alex Waterman
parent 14b218c284
commit f75a12e9c8

View File

@@ -376,6 +376,7 @@ static bool gv11b_mm_mmu_fault_handle_mmu_fault_refch(struct gk20a *g,
nvgpu_err(g, "chid: %d is referenceable but "
"not bound to tsg",
mmufault->refch->chid);
*id_ptr = mmufault->refch->chid;
*id_type_ptr = ID_TYPE_CHANNEL;
*rc_type_ptr = RC_TYPE_NO_RC;
}