mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
The function nvgpu_profiler_unbind_pm_resources is responsible for destroying the regops allowlist object, but unfortunately does it prior to any of the failure-prone operations. Because this function can be called multiple times, in rare cases it can happen that object is deallocated twice. This patch fixes the issue by moving the free operations after the failure-prone operations. Bug 3591603 Change-Id: I3415712da561ccf162c9fb7f3ebb942faa9d9420 Signed-off-by: Martin Radev <mradev@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2693803 (cherry picked from commit I3415712da561ccf162c9fb7f3ebb942faa9d9420) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2693799 Reviewed-by: Deepak Nibade <dnibade@nvidia.com> GVS: Gerrit_Virtual_Submit