mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
Do not decrement handle's refcount until allocation function is completed. If there is a data race between nvmap_ioctl_alloc and nvmap_ioctl_free, the dma-buf/handle can get freed before last access to dmabuf in nvmap_ioctl_alloc. Bug 4253472 Change-Id: Idbcee278df645389f85ad03d48fa7baa76a7213d Signed-off-by: Ketan Patil <ketanp@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2969182 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971778 Reviewed-by: Sachin Nikam <snikam@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>