mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-06 01:15:20 +02:00
ANDROID: rust_binder: don't pr_warn on benign errors
Currently, we will pr_warn to the kernel log if you try to send a
message to a process that is frozen or dead. This isn't really
necessary and adds a lot of noise to the log. Let's silence these
errors.
Fixes: bb1d504151
("ANDROID: rust_binder: add oneway transactions")
Change-Id: Ie0ec8ee5853413a7abe9c1b7d70ed4a9806f41e7
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
This commit is contained in:
parent
ce08a08a3e
commit
64018a934a
|
@ -37,6 +37,10 @@ impl BinderError {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn should_pr_warn(&self) -> bool {
|
||||
self.source.is_some()
|
||||
}
|
||||
|
||||
pub(crate) fn is_dead(&self) -> bool {
|
||||
self.reply == BR_DEAD_REPLY
|
||||
}
|
||||
|
|
|
@ -1248,7 +1248,7 @@ impl Thread {
|
|||
T: FnOnce(&Arc<Self>, &BinderTransactionDataSg) -> BinderResult,
|
||||
{
|
||||
if let Err(err) = inner(self, tr) {
|
||||
if err.reply != BR_TRANSACTION_COMPLETE {
|
||||
if err.should_pr_warn() {
|
||||
let mut ee = self.inner.lock().extended_error;
|
||||
ee.command = err.reply;
|
||||
ee.param = err.as_errno();
|
||||
|
|
Loading…
Reference in New Issue
Block a user