Skip to content

Commit 2b637d4

Browse files
committed
rust_binder: Implement BINDER_DEBUG_DEATH_NOTIFICATION
for death notification allocation failures This adds dynamic debug logs for: - Memory allocation failures when registering process death notifications due to out-of-memory (OOM) conditions. Change-Id: I2c7c90dc02808862d0709a95542bb79dd4cd7064 Signed-off-by: Jahnavi MN <jahnavimn@google.com>
1 parent 895f0d6 commit 2b637d4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/android/binder/process.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,10 @@ impl Process {
12671267
// Queue BR_ERROR if we can't allocate memory for the death notification.
12681268
let death = UniqueArc::new_uninit(GFP_KERNEL).inspect_err(|_| {
12691269
thread.push_return_work(BR_ERROR);
1270+
binder_debug!(
1271+
DeathNotification,
1272+
"BC_REQUEST_DEATH_NOTIFICATION failed"
1273+
);
12701274
})?;
12711275
let mut refs = self.node_refs.lock();
12721276
let Some(info) = refs.by_handle.get_mut(&handle) else {

0 commit comments

Comments
 (0)