linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] binder: fix incorrect cmd to binder_stat_br
@ 2017-08-08 22:48 Todd Kjos
  0 siblings, 0 replies; only message in thread
From: Todd Kjos @ 2017-08-08 22:48 UTC (permalink / raw)
  To: gregkh, arve, devel, linux-kernel, maco, dan.carpenter, tkjos

commit 26549d177410 ("binder: guarantee txn complete / errors delivered
in-order") passed the locally declared and undefined cmd
to binder_stat_br() which results in a bogus cmd field in a trace
event and BR stats are incremented incorrectly.

Change to use e->cmd which has been initialized.

Signed-off-by: Todd Kjos <tkjos@google.com>
---
 drivers/android/binder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 9f95d7093f32..f34fcb513c64 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -3619,7 +3619,7 @@ static int binder_thread_read(struct binder_proc *proc,
 			e->cmd = BR_OK;
 			ptr += sizeof(uint32_t);
 
-			binder_stat_br(proc, thread, cmd);
+			binder_stat_br(proc, thread, e->cmd);
 		} break;
 		case BINDER_WORK_TRANSACTION_COMPLETE: {
 			binder_inner_proc_unlock(proc);
-- 
2.14.0.434.g98096fd7a8-goog

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-08 22:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-08 22:48 [PATCH] binder: fix incorrect cmd to binder_stat_br Todd Kjos

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).