mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
binder: use group leader instead of open thread
commit c4ea41ba19 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e1c7a44788
commit
596b97ec2e
@@ -2966,8 +2966,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);
|
||||
|
||||
Reference in New Issue
Block a user