-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uefi: Improve handling of null-address allocations in allocate_pages
The firmware is allowed to return an allocation at address zero. This is not compatible with Rust, since it's UB to write through a null pointer. If a null address is returned, retry the allocation. If that second allocation still fails, return an error rather than panicking.
- Loading branch information
1 parent
07938b6
commit d42a3bf
Showing
2 changed files
with
33 additions
and
5 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