Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e3443d1 authored by Li Li's avatar Li Li
Browse files

Support BR_TRANSACTION_PENDING_FROZEN

When an async binder transaction is sent to a frozen process, the kernel
binder driver returns BR_TRANSACTION_PENDING_FROZEN. This tells the user
space app that pending async binder transaction won't be processed until
the target process is unfrozen at an unspecified time in the future.

Generally all binder transactions to frozen processes should be avoided
to prevent the kernel async binder buffer from running out.

Bug: 253913841
Test: freeze process and check logcat
Change-Id: Ie0191b0b3b6b0a4a8481f27f3b0e64e4c1279cb5
parent 9c0835a8
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -1017,6 +1017,10 @@ status_t IPCThreadState::waitForResponse(Parcel *reply, status_t *acquireResult)
            if (!reply && !acquireResult) goto finish;
            if (!reply && !acquireResult) goto finish;
            break;
            break;


        case BR_TRANSACTION_PENDING_FROZEN:
            ALOGW("Sending oneway calls to frozen process.");
            goto finish;

        case BR_DEAD_REPLY:
        case BR_DEAD_REPLY:
            err = DEAD_OBJECT;
            err = DEAD_OBJECT;
            goto finish;
            goto finish;
+5 −0
Original line number Original line Diff line number Diff line
@@ -100,4 +100,9 @@ struct binder_frozen_status_info {
#define BINDER_ENABLE_ONEWAY_SPAM_DETECTION _IOW('b', 16, __u32)
#define BINDER_ENABLE_ONEWAY_SPAM_DETECTION _IOW('b', 16, __u32)
#endif // BINDER_ENABLE_ONEWAY_SPAM_DETECTION
#endif // BINDER_ENABLE_ONEWAY_SPAM_DETECTION


#ifndef BR_TRANSACTION_PENDING_FROZEN
// Temporary definition of BR_TRANSACTION_PENDING_FROZEN until UAPI binder.h includes it.
#define BR_TRANSACTION_PENDING_FROZEN _IO('r', 20)
#endif // BR_TRANSACTION_PENDING_FROZEN

#endif // _BINDER_MODULE_H_
#endif // _BINDER_MODULE_H_