]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
[media] v4l: vb2-dma-contig: fix vb2_get_vma()
authorSri Krishna chowdary <schowdary@nvidia.com>
Tue, 12 Jan 2016 10:24:08 +0000 (15:54 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sun, 31 Jan 2016 23:32:18 +0000 (15:32 -0800)
commitbf1d15d8a879a599f9801310cecbbb61ea60e931
tree409458916654a49ff2e4c067c3bf40529ad6e0b2
parentd5be274fce34c329b4e34db3f209ef1beefb0978
[media] v4l: vb2-dma-contig: fix vb2_get_vma()

nvmap expects that same VMA is opened and closed to disallow
memory leaks. So, nvmap panics if a previously non-existent vma
is being closed through it.

Hence modify the sequence in vb2_get_vma() to
open the vma_copy before returning it. This way nvmap sees that
the vma_copy exists in its list and will close the vma.

Bug 200164002

Change-Id: I45dfb8ca710375a0e70d9802ebdcc9fd4d0b4600
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/931997
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Frank Shi <fshi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/media/v4l2-core/videobuf2-memops.c