bool existing_pid = false;
binder_debug(BINDER_DEBUG_OPEN_CLOSE, "%s: %d:%d\n", __func__,
- current->group_leader->pid, current->pid);
+ current->tgid, current->pid);
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
if (proc == NULL)
dbitmap_init(&proc->dmap);
spin_lock_init(&proc->inner_lock);
spin_lock_init(&proc->outer_lock);
- get_task_struct(current->group_leader);
- proc->tsk = current->group_leader;
+ proc->tsk = get_task_struct(current->group_leader);
+ proc->pid = current->tgid;
proc->cred = get_cred(filp->f_cred);
INIT_LIST_HEAD(&proc->todo);
init_waitqueue_head(&proc->freeze_wait);
binder_alloc_init(&proc->alloc);
binder_stats_created(BINDER_STAT_PROC);
- proc->pid = current->group_leader->pid;
INIT_LIST_HEAD(&proc->delivered_death);
INIT_LIST_HEAD(&proc->delivered_freeze);
INIT_LIST_HEAD(&proc->waiting_threads);
VISIBLE_IF_KUNIT void __binder_alloc_init(struct binder_alloc *alloc,
struct list_lru *freelist)
{
- alloc->pid = current->group_leader->pid;
+ alloc->pid = current->tgid;
alloc->mm = current->mm;
mmgrab(alloc->mm);
mutex_init(&alloc->mutex);