Skip to contentSkip to conversation

binder: fix BR_FROZEN_REPLY error log

PATCH In review Carlos Llamas 2 participants 2 messages Jan 23 – Jan 26 Android drivers

lore
Share & tools
lore

Carlos Llamas

author maintainer
#0 lore raw

PATCH 1/1 binder: fix BR_FROZEN_REPLY error log

The error logging for failed transactions is misleading as it always reports "dead process or thread" even when the target is actually frozen. Additionally, the pid and tid are reversed which can further confuse debugging efforts. Fix both issues.

Cc Steven Moreland <[email protected]>
Fixes a15dac8b2286 ("binder: additional transaction error logs")
---
 drivers/android/binder.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/android/binder.c +3 -2
index 535fc881c8da..2837162e73e8 100644
@@ -3812,8 +3812,9 @@ static void binder_transaction(struct binder_proc *proc,
 	return;
 
 err_dead_proc_or_thread:
-	binder_txn_error("%d:%d dead process or thread\n",
-		thread->pid, proc->pid);
+	binder_txn_error("%d:%d %s process or thread\n",
+			 proc->pid, thread->pid,
+			 return_error == BR_FROZEN_REPLY ? "frozen" : "dead");
 	return_error_line = __LINE__;
 	binder_dequeue_work(proc, tcomplete);
 err_translate_failed:
Signature · 1 line
2.52.0.457.g6b5491de43-goog
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Carlos Llamas

The error logging for failed transactions is misleading as it always reports "dead process or thread" even when the target is actually frozen. Additionally, the pid and tid are reversed which can further confuse debugging efforts. Fix both issues.

Cc Steven Moreland <[email protected]>
Fixes a15dac8b2286 ("binder: additional transaction error logs")