-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
oom: fix potential race between verification steps
There exists an opportunity for a race between checking the eventfd for events, and checking that the cgroup exists. Specifically: if we read the eventfd before the cgroup is destroyed, but check that the cgroup exists after its destroyed, we will miss a real oom (because the first event triggered was an oom) To mitigate this, we need to check the existance of the file before we read the event. Since the kernel first removes the files, then triggers an event, we resolve the race here Signed-off-by: Peter Hunt <[email protected]>
- Loading branch information
1 parent
9f3f784
commit 4303bb6
Showing
1 changed file
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters