mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
ad02c6afa5ab492742c6d69f6db47f1dd7a21c03
Some of the libraries may be linked into different namespaces, but they belong to same process. So each namespace can open the /dev/nvmap node and call nvmap ioctls, instead of reusing the already opened /dev/nvmap FD. Because of this, memory handles created by one namespace can't be used by other namespaces, even though they belong to same process. Fix this issue by following: - When /dev/nvmap node is opened, check if there is already any nvmap client with same pid, if yes use that client; otherwise, create new nvmap client. - Track the number of namespaces via count field. - When /dev/nvmap node is closed, destroy the nvmap client only when count reaches to 0. Bug 3689604 Change-Id: I4c91db36b88e78b7526dd63b006e562c8f66c7ae Signed-off-by: Ketan Patil <ketanp@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2819915 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Description
No description provided