mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
The error path in map_buffer() attempts to unmap a buffer twice to check that such action does not cause errors. The call site uses a field of a freed structure in the second call; store that in a local variable to avoid reading freed memory. Change-Id: I20fe66cf255dce25b1c4012bda2a6f864daf419a Signed-off-by: Konsta Hölttä <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2605495 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>