From: 宋金时 Date: Thu, 10 May 2018 02:05:03 +0000 (+0000) Subject: UPSTREAM: ANDROID: binder: correct the cmd print for BINDER_WORK_RETURN_ERROR X-Git-Tag: khadas-vims-v0.9.6-release~1584^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1b1a8be1d974793876bd9ce7a03d86ee4333cc7;p=platform%2Fkernel%2Flinux-amlogic.git UPSTREAM: 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 Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 838d5565669aa5bb7deb605684a5970d51d5eaf6) Change-Id: I425b32c5419a491c6b9ceee7c00dde6513e0421d --- diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 6121d01..2ed6f33 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -4093,6 +4093,7 @@ retry: binder_inner_proc_unlock(proc); if (put_user(e->cmd, (uint32_t __user *)ptr)) return -EFAULT; + cmd = e->cmd; e->cmd = BR_OK; ptr += sizeof(uint32_t);