From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754279AbdH1IPR (ORCPT ); Mon, 28 Aug 2017 04:15:17 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34970 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754258AbdH1IPO (ORCPT ); Mon, 28 Aug 2017 04:15:14 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martijn Coenen , John Stultz Subject: [PATCH 4.4 40/53] ANDROID: binder: fix proc->tsk check. Date: Mon, 28 Aug 2017 10:05:45 +0200 Message-Id: <20170828080519.454421415@linuxfoundation.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170828080517.599193891@linuxfoundation.org> References: <20170828080517.599193891@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Martijn Coenen 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 --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2869,7 +2869,7 @@ static int binder_mmap(struct file *filp 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)