mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 10:42:21 +03:00
get_task_struct increment the ref count over task struct, and it will be decremented as part of put_task_struct. task_struct won't be freed unless it's refcount becomes 0. Hence the missing put_task_struct in nvmap code was resulting into kmemleak. Fix it by add this missing call. Also, mutex_unlock was missing in one of the return path, add it. Bug 3901618 Change-Id: I630eac19e628a549179a8ddaad86ad4d2c9b9a53 Signed-off-by: Ketan Patil <ketanp@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2837383 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Ashish Mhetre <amhetre@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>