projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec906de
)
gpu: ion: Take handle reference in ion_vma_open
author
kfx
<kfx@rock-chips.com>
Thu, 22 Dec 2011 12:16:41 +0000
(20:16 +0800)
committer
kfx
<kfx@rock-chips.com>
Thu, 22 Dec 2011 12:18:46 +0000
(20:18 +0800)
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.
drivers/gpu/ion/ion.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/ion/ion.c
b/drivers/gpu/ion/ion.c
index 16dedc19b118041c81ff886663e3ac3acc22d0fa..c5873151de48e9c06feecef61a8c2809ac841e86 100755
(executable)
--- a/
drivers/gpu/ion/ion.c
+++ b/
drivers/gpu/ion/ion.c
@@
-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),