Re: [PATCH 6/7] rust_binder: Implement BINDER_DEBUG_FAILED_TRANSACTION logging for death notification allocation failures

From: Alice Ryhl

Date: Sat Jul 04 2026 - 17:17:49 EST


On Fri, Jul 03, 2026 at 03:29:27PM +0000, Jahnavi MN wrote:
> This adds dynamic debug logs for:
> - Memory allocation failures when registering process death
> notifications due to out-of-memory (OOM) conditions.
>
> Signed-off-by: Jahnavi MN <jahnavimn@xxxxxxxxxx>
> ---
> drivers/android/binder/process.rs | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/android/binder/process.rs b/drivers/android/binder/process.rs
> index db929cc35585..4c200d3d5604 100644
> --- a/drivers/android/binder/process.rs
> +++ b/drivers/android/binder/process.rs
> @@ -1238,6 +1238,11 @@ pub(crate) fn request_death(
> // Queue BR_ERROR if we can't allocate memory for the death notification.
> let death = UniqueArc::new_uninit(GFP_KERNEL).inspect_err(|_| {
> thread.push_return_work(BR_ERROR);
> + binder_debug!(
> + crate::debug::BINDER_DEBUG_FAILED_TRANSACTION,
> + "process {} BC_REQUEST_DEATH_NOTIFICATION failed",
> + self.pid_in_current_ns()
> + );

I think the error code BINDER_DEBUG_FAILED_TRANSACTION is a bit weird
here. Shouldn't it be BINDER_DEBUG_DEATH_NOTIFICATION?

Also, since you changed binder_debug! to already include the pid, you
can take it out here.

Alice