diff options
author | 宋金时 <songjinshi@xiaomi.com> | 2018-05-09 22:05:03 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-14 10:06:48 -0400 |
commit | 838d5565669aa5bb7deb605684a5970d51d5eaf6 (patch) | |
tree | 6bda5f8daa9642de1c78923a4c653c68c921b60f /drivers/android | |
parent | 1190b4e38f97023154e6b3bef61b251aa5f970d0 (diff) |
ANDROID: binder: correct the cmd print for BINDER_WORK_RETURN_ERROR
When to execute binder_stat_br the e->cmd has been modifying as BR_OK
instead of the original return error cmd, in fact we want to know the
original return error, such as BR_DEAD_REPLY or BR_FAILED_REPLY, etc.
instead of always BR_OK, in order to avoid the value of the e->cmd is
always BR_OK, so we need assign the value of the e->cmd to cmd before
e->cmd = BR_OK.
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android')
-rw-r--r-- | drivers/android/binder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 35f48a39144c..9c30d38c6f0d 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c | |||
@@ -3921,10 +3921,11 @@ retry: | |||
3921 | binder_inner_proc_unlock(proc); | 3921 | binder_inner_proc_unlock(proc); |
3922 | if (put_user(e->cmd, (uint32_t __user *)ptr)) | 3922 | if (put_user(e->cmd, (uint32_t __user *)ptr)) |
3923 | return -EFAULT; | 3923 | return -EFAULT; |
3924 | cmd = e->cmd; | ||
3924 | e->cmd = BR_OK; | 3925 | e->cmd = BR_OK; |
3925 | ptr += sizeof(uint32_t); | 3926 | ptr += sizeof(uint32_t); |
3926 | 3927 | ||
3927 | binder_stat_br(proc, thread, e->cmd); | 3928 | binder_stat_br(proc, thread, cmd); |
3928 | } break; | 3929 | } break; |
3929 | case BINDER_WORK_TRANSACTION_COMPLETE: { | 3930 | case BINDER_WORK_TRANSACTION_COMPLETE: { |
3930 | binder_inner_proc_unlock(proc); | 3931 | binder_inner_proc_unlock(proc); |