Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750940AbdGaFZn (ORCPT ); Mon, 31 Jul 2017 01:25:43 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:33497 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750739AbdGaFZm (ORCPT ); Mon, 31 Jul 2017 01:25:42 -0400 MIME-Version: 1.0 In-Reply-To: <20170728115608.61306-4-maco@android.com> References: <20170728115608.61306-1-maco@android.com> <20170728115608.61306-4-maco@android.com> From: Amit Pundir Date: Mon, 31 Jul 2017 10:55:00 +0530 Message-ID: Subject: Re: [PATCH 3/3] ANDROID: binder: fix proc->tsk check. To: Martijn Coenen Cc: Greg Kroah-Hartman , John Stultz , Todd Kjos , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , lkml , devel@driverdev.osuosl.org, Martijn Coenen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1078 Lines: 31 On 28 July 2017 at 17:26, Martijn Coenen wrote: > 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. > Fixes Android WiFi/BT regression reported on 4.13-rc2. Tested-by: Amit Pundir > 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 >