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
Loading
Please register or sign in to comment