Files
linux-nvgpu/drivers/gpu/nvgpu/common/sim
Seshendra Gadagottu a6d7b48665 gpu: nvgpu: sim: avoid memory leak with sim buffers
Sim buffers are getting allocated in nvgpu_sim_init_late,
which is called during each rail gate exit.
Sim buffers are getting de-allocated with nvgpu_free_sim_support,
which is getting called with module exit only.
So, to avoid memory leaks allocate sim buffers
only if there are not already allocated.

Jira NVGPU-6047

Change-Id: I7463866f9cb317aac43ad1d81f82f63ca301d38a
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2407637
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:13:28 -06:00
..