Commit 9dac44d5 authored by Martijn Coenen's avatar Martijn Coenen Committed by Greg Kroah-Hartman

ANDROID: binder: fix proc->tsk check.

commit b2a6d1b9 upstream.

Commit c4ea41ba ("binder: use group leader instead of open thread")'
was incomplete and didn't update a check in binder_mmap(), causing all
mmap() calls into the binder driver to fail.
Signed-off-by: default avatarMartijn Coenen <maco@android.com>
Tested-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1792d6c1
...@@ -2869,7 +2869,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma) ...@@ -2869,7 +2869,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
const char *failure_string; const char *failure_string;
struct binder_buffer *buffer; struct binder_buffer *buffer;
if (proc->tsk != current) if (proc->tsk != current->group_leader)
return -EINVAL; return -EINVAL;
if ((vma->vm_end - vma->vm_start) > SZ_4M) if ((vma->vm_end - vma->vm_start) > SZ_4M)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment