mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user