Re: [PATCH] rust_binder: check context manager before creating node
From: Miguel Ojeda
Date: Thu Jun 18 2026 - 07:34:07 EST
On Thu, Jun 18, 2026 at 1:19 PM Keshav Verma <iganschel@xxxxxxxxx> wrote:
>
> Thanks, I will fix the line wrapping and add the appropriate Fixes tag in v2.
Please consider (depending on the hash that this fixes) whether it
needs Cc: stable@ too.
> Repeating this with unique ptr/cookie values triggers the warning each time.
>
> Since this is easy to trigger from userspace, should I drop the pr_warn!() from the check in v2 and just return -EBUSY there?
If it is something that is expected to be able to be triggered from
userspace, then printing is a bad idea, and at the very least it may
need to be `pr_warn_once!` if you somehow think it can be useful for
users.
Now, for things that are truly logic errors, i.e. things that in
principle should not be possible to trigger from userspace unless
there is a bug in the kernel, you may consider `pr_warn_once!` +
`debug_assert!(false);` in that path. But only if you are truly sure
that it not meant to be hit.
I hope that helps.
Cheers,
Miguel