gpu: ion: Take handle reference in ion_vma_open

When ion_vma_open is called, a reference to the handle in
the vma must be taken. Otherwise, if forking occurs,
ion_vma_close will be called twice which will leave one of
the calls with an invalid reference.
This commit is contained in:
kfx
2011-12-22 20:16:41 +08:00
parent ec906de361
commit e1fcd840d7

View File

@@ -798,6 +798,7 @@ static void ion_vma_open(struct vm_area_struct *vma)
vma->vm_private_data = NULL;
return;
}
ion_handle_get(handle);
pr_debug("%s: %d client_cnt %d handle_cnt %d alloc_cnt %d\n",
__func__, __LINE__,
atomic_read(&client->ref.refcount),