diff options
author | vdumpa <vdumpa@nvidia.com> | 2010-10-05 13:08:12 -0700 |
---|---|---|
committer | Yu-Huan Hsu <yhsu@nvidia.com> | 2010-10-05 15:00:02 -0700 |
commit | 37950bcdd4fdd21b0ff0770c9c5c2fb8c50fbfff (patch) | |
tree | 4fe256e37d58e9733f79c1eb99356bf252481e64 /drivers/video | |
parent | f53faa616294450f1ed05b5bfd249b577b709399 (diff) |
[tegra/nvmap] Fix iounmap issue in nvmap.
Incorrect address is passed to iounmap, which is causing virtual space leak.
Bug 732355
Reviewed-on: http://git-master/r/7554
(cherry picked from commit 593fc2ae6dfadff51ca45353b35dfbd3de0fcce7)
Change-Id: Id69a7b3a6e130c91d594fc0ff32b8080cf192e2c
Reviewed-on: http://git-master/r/7858
Tested-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/tegra/nvmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/tegra/nvmap.c b/drivers/video/tegra/nvmap.c index b407644a90f3..771f3ef133d7 100644 --- a/drivers/video/tegra/nvmap.c +++ b/drivers/video/tegra/nvmap.c @@ -1030,7 +1030,7 @@ void _nvmap_handle_free(struct nvmap_handle *h) vm_unmap_ram(h->kern_map, h->size>>PAGE_SHIFT); else { unsigned long addr = (unsigned long)h->kern_map; - addr &= ~PAGE_MASK; + addr &= PAGE_MASK; iounmap((void *)addr); } } @@ -3397,7 +3397,7 @@ void nvmap_free(struct nvmap_handle *h, void *map) vm_unmap_ram(map, h->size >> PAGE_SHIFT); } else { unsigned long addr = (unsigned long)map; - addr &= ~PAGE_MASK; + addr &= PAGE_MASK; iounmap((void *)addr); } h->kern_map = NULL; |