video: tegra: nvmap: Add ref count in nvmap_vma_list
authorSri Krishna chowdary <schowdary@nvidia.com>
Wed, 27 Apr 2016 04:14:15 +0000 (09:14 +0530)
committerMatthew Pedro <mapedro@nvidia.com>
Thu, 28 Apr 2016 22:00:40 +0000 (15:00 -0700)
commitfedeb7e91f994c868d79641b84fc1ffff3d1254a
treeb2c4faf11b37270c961afa465a92990e707e4758
parent084df2dcb7607c947d061056a66eef55f308512c
video: tegra: nvmap: Add ref count in nvmap_vma_list

Add ref count to prevent invalid vma removal from the h->vmas list
and also allow addition of a different vma which also has same
nvmap_vma_priv as vm_private_data into the h->vmas list. Both cases
are allowed in valid usage of nvmap_vma_open/nvmap_vma_close.

Bug 200164002

Change-Id: Ifc4d281dd91e1d072a9a3ee85e925040bd65a6bc
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1133708
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
drivers/video/tegra/nvmap/nvmap_dev.c
drivers/video/tegra/nvmap/nvmap_priv.h