Skip to contentSkip to conversation

binder: fix incorrect cmd to binder_stat_br

PATCH New Todd Kjos 1 participant 1 message Aug 8, 2017 Android drivers

lore
Share & tools
lore

Todd Kjos

author maintainer
#0 lore raw

PATCH 1/1 binder: fix incorrect cmd to binder_stat_br

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.

---
 drivers/android/binder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/android/binder.c +1 -1
index 9f95d7093f32..f34fcb513c64 100644
@@ -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);
Signature · 1 line
2.14.0.434.g98096fd7a8-goog