linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ANDROID: binder: correct the cmd print for BINDER_WORK_RETURN_ERROR
@ 2018-05-09  7:31 宋金时
  2018-05-09 18:08 ` Todd Kjos
  0 siblings, 1 reply; 3+ messages in thread
From: 宋金时 @ 2018-05-09  7:31 UTC (permalink / raw)
  To: gregkh, maco, tkjos, arve; +Cc: linux-kernel

In case of the BINDER_WORK_RETURN_ERROR the cmd is no assignment,
so it's value will be old value or dirty value, before modifying
e->cmd, assign the value of the e->cmd to cmd to ensure the correct
print of binder_stat_br.

Signed-off-by: songjinshi <songjinshi@xiaomi.com>
---

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 4ffc84d..acd7d44a 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -4086,6 +4086,7 @@
 			struct binder_error *e = container_of(
 					w, struct binder_error, work);
 
+			cmd = e->cmd;
 			WARN_ON(e->cmd == BR_OK);
 			binder_inner_proc_unlock(proc);
 			if (put_user(e->cmd, (uint32_t __user *)ptr))

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-10  2:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09  7:31 [PATCH] ANDROID: binder: correct the cmd print for BINDER_WORK_RETURN_ERROR 宋金时
2018-05-09 18:08 ` Todd Kjos
2018-05-10  2:41   ` 答复: " 宋金时

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).