[PATCH 6/7] rust_binder: Implement BINDER_DEBUG_FAILED_TRANSACTION logging for death notification allocation failures
From: Jahnavi MN via B4 Relay
Date: Fri Jul 03 2026 - 11:30:17 EST
From: Jahnavi MN <jahnavimn@xxxxxxxxxx>
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()
+ );
})?;
let mut refs = self.node_refs.lock();
let Some(info) = refs.by_handle.get_mut(&handle) else {
--
2.55.0.rc0.799.gd6f94ed593-goog