-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spice-display: reduce race in sending IOSurface
There is a kernel bug detailed in utmapp/UTM#2743 (comment) which results in a race whenever IOSurfaceGetID/IOSurfaceLookup is used. As a result, we need a way to "indicate" to the receiver that the surface id in the pipe is now stale and should not be used. To do this we send POLLHUP to poll() by closing the write FD when the surface is about to be deallocated. Note this does not fix the race completely as there is still a small chance that the race happens between the close() and the CFRelease() but the chance of that is small and the whole FD passing surface ID system is a hack anyways that should be replaced with a proper set of SPICE APIs one day...
- Loading branch information
Showing
2 changed files
with
17 additions
and
2 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