Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752015AbdG1L6D (ORCPT ); Fri, 28 Jul 2017 07:58:03 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:34984 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751775AbdG1L4S (ORCPT ); Fri, 28 Jul 2017 07:56:18 -0400 From: Martijn Coenen To: gregkh@linuxfoundation.org, john.stultz@linaro.org, tkjos@google.com, arve@android.com, amit.pundir@linaro.org Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, maco@google.com, Martijn Coenen Subject: [PATCH 3/3] ANDROID: binder: fix proc->tsk check. Date: Fri, 28 Jul 2017 13:56:08 +0200 Message-Id: <20170728115608.61306-4-maco@android.com> X-Mailer: git-send-email 2.14.0.rc0.400.g1c36432dff-goog In-Reply-To: <20170728115608.61306-1-maco@android.com> References: <20170728115608.61306-1-maco@android.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 819 Lines: 24 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 --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index f7665c31feca..831cdd7d197d 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -3362,7 +3362,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) -- 2.14.0.rc0.400.g1c36432dff-goog