Commit 51c70261 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Revert "android: binder: fix dangling pointer comparison"

This reverts commit 7b142d8f.

It doesn't seem to be correct, no one seems to have tested it, and the
email address of the submitter now bounces :(

So revert it.

Cc: Jann Horn <jannh@google.com>
Cc: Chen Feng <puck.chen@hisilicon.com>
Cc: stable <stable@vger.kernel.org>
Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 83cf8df2
...@@ -2962,7 +2962,6 @@ static int binder_open(struct inode *nodp, struct file *filp) ...@@ -2962,7 +2962,6 @@ static int binder_open(struct inode *nodp, struct file *filp)
return -ENOMEM; return -ENOMEM;
get_task_struct(current); get_task_struct(current);
proc->tsk = current; proc->tsk = current;
atomic_inc(&current->mm->mm_count);
proc->vma_vm_mm = current->mm; proc->vma_vm_mm = current->mm;
INIT_LIST_HEAD(&proc->todo); INIT_LIST_HEAD(&proc->todo);
init_waitqueue_head(&proc->wait); init_waitqueue_head(&proc->wait);
...@@ -3168,7 +3167,6 @@ static void binder_deferred_release(struct binder_proc *proc) ...@@ -3168,7 +3167,6 @@ static void binder_deferred_release(struct binder_proc *proc)
vfree(proc->buffer); vfree(proc->buffer);
} }
mmdrop(proc->vma_vm_mm);
put_task_struct(proc->tsk); put_task_struct(proc->tsk);
binder_debug(BINDER_DEBUG_OPEN_CLOSE, binder_debug(BINDER_DEBUG_OPEN_CLOSE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment