summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrishna Reddy <vdumpa@nvidia.com>2013-09-18 11:22:13 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-26 19:46:18 -0700
commitf63f7834d109cdb5eb59a27f26080da25372c555 (patch)
tree272747d8c1e26df8940e5950eea012719052b766
parent68c75a44f0fc6f98c5bb8a4a17b49fa578dd5647 (diff)
video: tegra: nvmap: fix nvmap_sgt free bug
fix sgt free bug as well. Change-Id: I56fb6a5d77f870a888c0f2ce683e062673a3fec6 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/276365 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit
-rw-r--r--drivers/video/tegra/nvmap/nvmap_dmabuf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_dmabuf.c b/drivers/video/tegra/nvmap/nvmap_dmabuf.c
index f7d69e21c0ea..c18dabc3e3d1 100644
--- a/drivers/video/tegra/nvmap/nvmap_dmabuf.c
+++ b/drivers/video/tegra/nvmap/nvmap_dmabuf.c
@@ -201,7 +201,7 @@ static void __nvmap_dmabuf_free_sgt_locked(struct nvmap_handle_sgt *nvmap_sgt)
__nvmap_free_sg_table(NULL, info->handle, nvmap_sgt->sgt);
WARN(atomic_read(&nvmap_sgt->refs), "nvmap: Freeing reffed SGT!");
- kfree(nvmap_sgt);
+ kmem_cache_free(handle_sgt_cache, nvmap_sgt);
}
/*
@@ -690,8 +690,7 @@ void nvmap_dmabuf_free_sg_table(struct dma_buf *dmabuf, struct sg_table *sgt)
if (WARN_ON(!virt_addr_valid(sgt)))
return;
- sg_free_table(sgt);
- kmem_cache_free(handle_sgt_cache, sgt);
+ __nvmap_free_sg_table(NULL, NULL, sgt);
}
void nvmap_set_dmabuf_private(struct dma_buf *dmabuf, void *priv,