diff options
Diffstat (limited to 'drivers/android/binder.c')
-rw-r--r-- | drivers/android/binder.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index aae4d8d4be36..f7665c31feca 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c | |||
@@ -2200,8 +2200,12 @@ static void binder_transaction(struct binder_proc *proc, | |||
2200 | list_add_tail(&t->work.entry, target_list); | 2200 | list_add_tail(&t->work.entry, target_list); |
2201 | tcomplete->type = BINDER_WORK_TRANSACTION_COMPLETE; | 2201 | tcomplete->type = BINDER_WORK_TRANSACTION_COMPLETE; |
2202 | list_add_tail(&tcomplete->entry, &thread->todo); | 2202 | list_add_tail(&tcomplete->entry, &thread->todo); |
2203 | if (target_wait) | 2203 | if (target_wait) { |
2204 | wake_up_interruptible(target_wait); | 2204 | if (reply || !(t->flags & TF_ONE_WAY)) |
2205 | wake_up_interruptible_sync(target_wait); | ||
2206 | else | ||
2207 | wake_up_interruptible(target_wait); | ||
2208 | } | ||
2205 | return; | 2209 | return; |
2206 | 2210 | ||
2207 | err_translate_failed: | 2211 | err_translate_failed: |
@@ -3247,10 +3251,6 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
3247 | /*pr_info("binder_ioctl: %d:%d %x %lx\n", | 3251 | /*pr_info("binder_ioctl: %d:%d %x %lx\n", |
3248 | proc->pid, current->pid, cmd, arg);*/ | 3252 | proc->pid, current->pid, cmd, arg);*/ |
3249 | 3253 | ||
3250 | if (unlikely(current->mm != proc->vma_vm_mm)) { | ||
3251 | pr_err("current mm mismatch proc mm\n"); | ||
3252 | return -EINVAL; | ||
3253 | } | ||
3254 | trace_binder_ioctl(cmd, arg); | 3254 | trace_binder_ioctl(cmd, arg); |
3255 | 3255 | ||
3256 | ret = wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2); | 3256 | ret = wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2); |
@@ -3464,9 +3464,8 @@ static int binder_open(struct inode *nodp, struct file *filp) | |||
3464 | proc = kzalloc(sizeof(*proc), GFP_KERNEL); | 3464 | proc = kzalloc(sizeof(*proc), GFP_KERNEL); |
3465 | if (proc == NULL) | 3465 | if (proc == NULL) |
3466 | return -ENOMEM; | 3466 | return -ENOMEM; |
3467 | get_task_struct(current); | 3467 | get_task_struct(current->group_leader); |
3468 | proc->tsk = current; | 3468 | proc->tsk = current->group_leader; |
3469 | proc->vma_vm_mm = current->mm; | ||
3470 | INIT_LIST_HEAD(&proc->todo); | 3469 | INIT_LIST_HEAD(&proc->todo); |
3471 | init_waitqueue_head(&proc->wait); | 3470 | init_waitqueue_head(&proc->wait); |
3472 | proc->default_priority = task_nice(current); | 3471 | proc->default_priority = task_nice(current); |