This can allow catching handle dmabuf usage during its free.
Bug
1529015
Change-Id: Ie20c7b860ca5194a190ff7005302bf50602d16ed
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/424329
(cherry picked from commit
10e648c2e2f9760c97ce55a1091d9e7097d2504d)
Reviewed-on: http://git-master/r/448530
Tested-by: Winnie Hsu <whsu@nvidia.com>
info->handle->owner->name : "unknown",
info->handle,
dmabuf);
+ BUG_ON(dmabuf != info->handle->dmabuf);
+ info->handle->dmabuf = NULL;
mutex_lock(&info->maps_lock);
while (!list_empty(&info->maps)) {
}
mutex_unlock(&info->maps_lock);
- dma_buf_detach(info->handle->dmabuf, info->handle->attachment);
- info->handle->dmabuf = NULL;
+ dma_buf_detach(dmabuf, info->handle->attachment);
nvmap_handle_put(info->handle);
kfree(info);
}