UPSTREAM: 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 <[email protected]>
Signed-off-by: Carlos Llamas <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Bug: 388902813
(cherry picked from commit 48dc1c3608befa1ede8465805ca5cbc2ddf5df8a)
Change-Id: Icd0364386e28b28fe6b32d1cf4f3c76a66215853
Signed-off-by: Carlos Llamas <[email protected]>
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 60fc85a..e149177 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -3920,13 +3920,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);
{