summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/DisplayDevice.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2025-02-24 22:37:02 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2025-03-18 19:37:12 +0000
commit727cbc09e054a64b639a878b60c7c288b4bb2d1e (patch)
treec4ae3c9813a30ed7e73a6ae5d7831da17883d0ff /services/surfaceflinger/DisplayDevice.cpp
parentbcbec20c069ccb1f3d2faa34aec1857aec06bc8f (diff)
EventHub: Close opening device before deleting on sysfs change
We must unregister all fds from epoll before closing them to avoid the fds from remaining open and thus leaking. Prevent fd leaks by closing any opening device from epoll before closing the Device via its destructor when the sysfs node changes and triggers a device reopening. In this CL, we modify the closeDeviceLocked function to also look at mOpeningDevices when a device is being closed. Context: https://idea.popcount.org/2017-03-20-epoll-is-fundamentally-broken-22/ Bug: 397208968 Test: Presubmit Flag: EXEMPT bug fix Change-Id: I3de8a9413e68a0b7409e5d0bf56b9d76b7164b49
Diffstat (limited to 'services/surfaceflinger/DisplayDevice.cpp')
0 files changed, 0 insertions, 0 deletions