Skip to content

Commit 596b97e

Browse files
Todd Kjosgregkh
authored andcommitted
binder: use group leader instead of open thread
commit c4ea41ba195d01c9af66fb28711a16cc97caa9c5 upstream. 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 <tkjos@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e1c7a44 commit 596b97e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/android/binder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2966,8 +2966,8 @@ static int binder_open(struct inode *nodp, struct file *filp)
29662966
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
29672967
if (proc == NULL)
29682968
return -ENOMEM;
2969-
get_task_struct(current);
2970-
proc->tsk = current;
2969+
get_task_struct(current->group_leader);
2970+
proc->tsk = current->group_leader;
29712971
INIT_LIST_HEAD(&proc->todo);
29722972
init_waitqueue_head(&proc->wait);
29732973
proc->default_priority = task_nice(current);

0 commit comments

Comments
 (0)