Unregister event handler fd before closing the fd in EventBaseAtomicNotificationQueue.
Summary: Thread 1: - Creates an eventfd X - Registers X with an event base - Closes X - Unregisters X from the event base Thread 2: - Creates some other file descriptor (eventfd or socket or whatever); the operating system reuses file descriptor #X. The unregistering of X from the event base in thread 1 races with the opening of reused X in thread 2. The fix is to unregister X before closing X. Reviewed By: yfeldblum Differential Revision: D27962155 fbshipit-source-id: 1bcb62c7ebe0297ab9687e1a0edf37d319637fda
Showing
Please register or sign in to comment