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

Unverified Commit 847c78fc authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-security-11.0.0_r58' of...

Merge tag 'android-security-11.0.0_r58' of https://android.googlesource.com/platform/frameworks/native into staging/lineage-18.1_merge_android-security-11.0.0_r58

Android Security 11.0.0 Release 58 (8712617)

* tag 'android-security-11.0.0_r58' of https://android.googlesource.com/platform/frameworks/native:
  RESTRICT AUTOMERGE SurfaceFlinger: fix a potential race condition in stealReceiveChannel

Change-Id: I8bc8da4a164a8b94109426913f383b099bfaaaaa
parents 101d8a1f 04d80866
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -139,6 +139,11 @@ void EventThreadConnection::onFirstRef() {
}

status_t EventThreadConnection::stealReceiveChannel(gui::BitTube* outChannel) {
    std::scoped_lock lock(mLock);
    if (mChannel.initCheck() != NO_ERROR) {
        return NAME_NOT_FOUND;
    }

    outChannel->setReceiveFd(mChannel.moveReceiveFd());
    outChannel->setSendFd(base::unique_fd(dup(mChannel.getSendFd())));
    return NO_ERROR;
+2 −1
Original line number Diff line number Diff line
@@ -92,7 +92,8 @@ public:
private:
    virtual void onFirstRef();
    EventThread* const mEventThread;
    gui::BitTube mChannel;
    std::mutex mLock;
    gui::BitTube mChannel GUARDED_BY(mLock);
};

class EventThread {