ANDROID: fix ENOMEM check of binder_proc_ext
The check should be done against 'eproc' before it gets dereferenced.
Fixes: d49297739550 ("BACKPORT: binder: use euid from cred instead of using task")
Change-Id: Ief0c08212c4da8bdfdf628474de9dd30ee5a8db0
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This commit is contained in:
parent
be02156857
commit
a03c6437cf
1 changed files with 2 additions and 2 deletions
|
|
@ -5944,9 +5944,9 @@ static int binder_open(struct inode *nodp, struct file *filp)
|
|||
current->group_leader->pid, current->pid);
|
||||
|
||||
eproc = kzalloc(sizeof(*eproc), GFP_KERNEL);
|
||||
proc = &eproc->proc;
|
||||
if (proc == NULL)
|
||||
if (eproc == NULL)
|
||||
return -ENOMEM;
|
||||
proc = &eproc->proc;
|
||||
spin_lock_init(&proc->inner_lock);
|
||||
spin_lock_init(&proc->outer_lock);
|
||||
get_task_struct(current->group_leader);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue