Re: [PATCH] binder: log transaction code on failure

From: Alice Ryhl
Date: Fri Jan 10 2025 - 07:11:52 EST


On Fri, Jan 10, 2025 at 1:05 AM Carlos Llamas <cmllamas@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxx>
> Signed-off-by: Carlos Llamas <cmllamas@xxxxxxxxxx>
> ---
> drivers/android/binder.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index ef353ca13c35..cb4187a4e595 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -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 %d size %lld-%lld line %d\n",

Shouldn't this by %u instead?

Alice