Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20250110175051.2656975-1-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Carlos Llamas and committed by
Greg Kroah-Hartman
48dc1c36 be887fca

+2 -2
+2 -2
drivers/android/binder.c
··· 3801 3801 } 3802 3802 3803 3803 binder_debug(BINDER_DEBUG_FAILED_TRANSACTION, 3804 - "%d:%d transaction %s to %d:%d failed %d/%d/%d, size %lld-%lld line %d\n", 3804 + "%d:%d transaction %s to %d:%d failed %d/%d/%d, code %u size %lld-%lld line %d\n", 3805 3805 proc->pid, thread->pid, reply ? "reply" : 3806 3806 (tr->flags & TF_ONE_WAY ? "async" : "call"), 3807 3807 target_proc ? target_proc->pid : 0, 3808 3808 target_thread ? target_thread->pid : 0, 3809 3809 t_debug_id, return_error, return_error_param, 3810 - (u64)tr->data_size, (u64)tr->offsets_size, 3810 + tr->code, (u64)tr->data_size, (u64)tr->offsets_size, 3811 3811 return_error_line); 3812 3812 3813 3813 if (target_thread)