diff options
| author | Xu YiPing <xuyiping@hisilicon.com> | 2017-05-22 11:26:23 -0700 |
|---|---|---|
| committer | Todd Kjos <tkjos@google.com> | 2017-09-05 19:11:58 +0000 |
| commit | ab10c4d8d6f5a42665e61acec78d64e021f4b68c (patch) | |
| tree | 84103bf78ccb9c3306b76fcb6a041094662d9e89 | |
| parent | cff17411c160fced8aaa0a4eb9c0149cf24c91e8 (diff) | |
FROMLIST: binder: fix memory corruption in binder_transaction binder
(from https://patchwork.kernel.org/patch/9939405/)
commit 7a4408c6bd3e ("binder: make sure accesses to proc/thread are
safe") made a change to enqueue tcomplete to thread->todo before
enqueuing the transaction. However, in err_dead_proc_or_thread case,
the tcomplete is directly freed, without dequeued. It may cause the
thread->todo list to be corrupted.
So, dequeue it before freeing.
Bug: 65333488
Change-Id: Id063a4db18deaa634f4d44aa6ebca47bea32537a
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
| -rw-r--r-- | drivers/android/binder.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 799de03d75a8..810ff70104c1 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -3253,6 +3253,7 @@ static void binder_transaction(struct binder_proc *proc, err_dead_proc_or_thread: return_error = BR_DEAD_REPLY; return_error_line = __LINE__; + binder_dequeue_work(proc, tcomplete); err_translate_failed: err_bad_object_type: err_bad_offset: |
