From: Martijn Coenen Date: Fri, 28 Jul 2017 11:56:08 +0000 (+0200) Subject: ANDROID: binder: fix proc->tsk check. X-Git-Tag: v4.4.85~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9dac44d5d4b0a7fffe04ad505e0a082e900ad767;p=thirdparty%2Fkernel%2Fstable.git ANDROID: binder: fix proc->tsk check. commit b2a6d1b999a4c13e5997bb864694e77172d45250 upstream. Commit c4ea41ba195d ("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: Martijn Coenen Tested-by: John Stultz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 74da4821b8d68..5531f020e5612 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2869,7 +2869,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma) const char *failure_string; struct binder_buffer *buffer; - if (proc->tsk != current) + if (proc->tsk != current->group_leader) return -EINVAL; if ((vma->vm_end - vma->vm_start) > SZ_4M)