forked from firecracker-microvm/firecracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(example): correctly handle
Removed
events in uffd exammple
The UFFD handler might receive events out of order compared to how they actually happened. For example, if the guest first frees a page to the balloon device, and then immediately faults it in again, the UFFD handler might see the page fault before the freeing. This is a problem, as any pending `Remove` events in the queue will "block" the userfault FD (all ioctls return -EAGAIN). Fix this by always draining all events from the fd's queue, and gracefully handling -EAGAIN. Please see the code comment for in-depth analysis of the flow. Fixes firecracker-microvm#4990 Signed-off-by: Patrick Roy <[email protected]>
- Loading branch information
Showing
3 changed files
with
92 additions
and
28 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
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
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