linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] binder: Add invalid handle info in user error log
@ 2021-08-02 17:41 Ramji Jiyani
  2021-08-02 18:22 ` Todd Kjos
  0 siblings, 1 reply; 3+ messages in thread
From: Ramji Jiyani @ 2021-08-02 17:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
	Martijn Coenen, Joel Fernandes, Christian Brauner,
	Hridya Valsaraju, Suren Baghdasaryan
  Cc: Ramji Jiyani, kernel-team, linux-kernel

In case of a fail transaction to the target node; user error log currently
only prints the thread and process id. Add handle info for the reference
to the target node in user error log to aid debugging.

Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
---
 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 bcec598b89f2..d9030cb6b1e4 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2547,8 +2547,8 @@ static void binder_transaction(struct binder_proc *proc,
 						ref->node, &target_proc,
 						&return_error);
 			} else {
-				binder_user_error("%d:%d got transaction to invalid handle\n",
-						  proc->pid, thread->pid);
+				binder_user_error("%d:%d got transaction to invalid handle, %u\n",
+						  proc->pid, thread->pid, tr->target.handle);
 				return_error = BR_FAILED_REPLY;
 			}
 			binder_proc_unlock(proc);
-- 
2.32.0.554.ge1b32706d8-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] binder: Add invalid handle info in user error log
  2021-08-02 17:41 [PATCH] binder: Add invalid handle info in user error log Ramji Jiyani
@ 2021-08-02 18:22 ` Todd Kjos
  2021-08-02 22:08   ` Ramji Jiyani
  0 siblings, 1 reply; 3+ messages in thread
From: Todd Kjos @ 2021-08-02 18:22 UTC (permalink / raw)
  To: Ramji Jiyani
  Cc: Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
	Martijn Coenen, Joel Fernandes, Christian Brauner,
	Hridya Valsaraju, Suren Baghdasaryan, kernel-team, linux-kernel

On Mon, Aug 2, 2021 at 10:41 AM 'Ramji Jiyani' via kernel-team
<kernel-team@android.com> wrote:
>
> In case of a fail transaction to the target node; user error log currently

nit: I'd rephrase this to something like  "In the case of a failed
transaction, only the thread and process id are logged. Add the handle
info..."

> only prints the thread and process id. Add handle info for the reference
> to the target node in user error log to aid debugging.
>
> Signed-off-by: Ramji Jiyani <ramjiyani@google.com>

Acked-by: Todd Kjos <tkjos@google.com>

> ---
>  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 bcec598b89f2..d9030cb6b1e4 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -2547,8 +2547,8 @@ static void binder_transaction(struct binder_proc *proc,
>                                                 ref->node, &target_proc,
>                                                 &return_error);
>                         } else {
> -                               binder_user_error("%d:%d got transaction to invalid handle\n",
> -                                                 proc->pid, thread->pid);
> +                               binder_user_error("%d:%d got transaction to invalid handle, %u\n",
> +                                                 proc->pid, thread->pid, tr->target.handle);
>                                 return_error = BR_FAILED_REPLY;
>                         }
>                         binder_proc_unlock(proc);
> --
> 2.32.0.554.ge1b32706d8-goog
>
> --
> To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com.
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] binder: Add invalid handle info in user error log
  2021-08-02 18:22 ` Todd Kjos
@ 2021-08-02 22:08   ` Ramji Jiyani
  0 siblings, 0 replies; 3+ messages in thread
From: Ramji Jiyani @ 2021-08-02 22:08 UTC (permalink / raw)
  To: Todd Kjos
  Cc: Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
	Martijn Coenen, Joel Fernandes, Christian Brauner,
	Hridya Valsaraju, Suren Baghdasaryan, kernel-team, linux-kernel

On Mon, Aug 2, 2021 at 11:22 AM Todd Kjos <tkjos@google.com> wrote:
>
> On Mon, Aug 2, 2021 at 10:41 AM 'Ramji Jiyani' via kernel-team
> <kernel-team@android.com> wrote:
> >
> > In case of a fail transaction to the target node; user error log currently
>
> nit: I'd rephrase this to something like  "In the case of a failed
> transaction, only the thread and process id are logged. Add the handle
> info..."

Thanks for the review. Submitted v2 with the fix.

>
> > only prints the thread and process id. Add handle info for the reference
> > to the target node in user error log to aid debugging.
> >
> > Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
>
> Acked-by: Todd Kjos <tkjos@google.com>

Thanks for the Ack.

>
> > ---
> >  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 bcec598b89f2..d9030cb6b1e4 100644
> > --- a/drivers/android/binder.c
> > +++ b/drivers/android/binder.c
> > @@ -2547,8 +2547,8 @@ static void binder_transaction(struct binder_proc *proc,
> >                                                 ref->node, &target_proc,
> >                                                 &return_error);
> >                         } else {
> > -                               binder_user_error("%d:%d got transaction to invalid handle\n",
> > -                                                 proc->pid, thread->pid);
> > +                               binder_user_error("%d:%d got transaction to invalid handle, %u\n",
> > +                                                 proc->pid, thread->pid, tr->target.handle);
> >                                 return_error = BR_FAILED_REPLY;
> >                         }
> >                         binder_proc_unlock(proc);
> > --
> > 2.32.0.554.ge1b32706d8-goog
> >
> > --
> > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com.
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-02 22:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 17:41 [PATCH] binder: Add invalid handle info in user error log Ramji Jiyani
2021-08-02 18:22 ` Todd Kjos
2021-08-02 22:08   ` Ramji Jiyani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).