Commit 48dc1c36 authored by Carlos Llamas's avatar Carlos Llamas Committed by Greg Kroah-Hartman
Browse files

binder: log transaction code on failure



When a transaction fails, log the 'tr->code' to help indentify the
problematic userspace call path. This additional information will
simplify debugging efforts.

Cc: Steven Moreland <smoreland@google.com>
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20250110175051.2656975-1-cmllamas@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent be887fca
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3801,13 +3801,13 @@ static void binder_transaction(struct binder_proc *proc,
	}

	binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
		     "%d:%d transaction %s to %d:%d failed %d/%d/%d, size %lld-%lld line %d\n",
		     "%d:%d transaction %s to %d:%d failed %d/%d/%d, code %u size %lld-%lld line %d\n",
		     proc->pid, thread->pid, reply ? "reply" :
		     (tr->flags & TF_ONE_WAY ? "async" : "call"),
		     target_proc ? target_proc->pid : 0,
		     target_thread ? target_thread->pid : 0,
		     t_debug_id, return_error, return_error_param,
		     (u64)tr->data_size, (u64)tr->offsets_size,
		     tr->code, (u64)tr->data_size, (u64)tr->offsets_size,
		     return_error_line);

	if (target_thread)