From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756123AbdGXVA4 (ORCPT ); Mon, 24 Jul 2017 17:00:56 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:38047 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753513AbdGXVAq (ORCPT ); Mon, 24 Jul 2017 17:00:46 -0400 MIME-Version: 1.0 In-Reply-To: <20170629190211.16927-3-tkjos@google.com> References: <20170629190211.16927-1-tkjos@google.com> <20170629190211.16927-3-tkjos@google.com> From: John Stultz Date: Mon, 24 Jul 2017 14:00:45 -0700 X-Google-Sender-Auth: z3EFu8xzFJgDF7sK_F3ztSQX88I Message-ID: Subject: Re: [PATCH 02/37] binder: use group leader instead of open thread To: Todd Kjos Cc: Greg Kroah-Hartman , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , devel@driverdev.osuosl.org, Linux Kernel Mailing List , Martijn Coenen , Todd Kjos Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 29, 2017 at 12:01 PM, Todd Kjos wrote: > The binder allocator assumes that the thread that > called binder_open will never die for the lifetime of > that proc. That thread is normally the group_leader, > however it may not be. Use the group_leader instead > of current. > > Signed-off-by: Todd Kjos > --- > drivers/android/binder.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/android/binder.c b/drivers/android/binder.c > index 157bd3e49ff4..9393924ae8e8 100644 > --- a/drivers/android/binder.c > +++ b/drivers/android/binder.c > @@ -3460,8 +3460,8 @@ static int binder_open(struct inode *nodp, struct file *filp) > proc = kzalloc(sizeof(*proc), GFP_KERNEL); > if (proc == NULL) > return -ENOMEM; > - get_task_struct(current); > - proc->tsk = current; > + get_task_struct(current->group_leader); > + proc->tsk = current->group_leader; > INIT_LIST_HEAD(&proc->todo); > init_waitqueue_head(&proc->wait); > proc->default_priority = task_nice(current); > -- So this patch landed in 4.13-rc2 (c4ea41ba195d), and seems to be causing a regression for me w/ HiKey. With it, I'm getting crashes with the bluetooth and wifi HALs. Reverting this patch seems to resolve the issue I suspect some other dependency from the original patchset is missing? thanks -john