1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:48:12 +00:00

Kernel: Make allocate_supervisor_physical_page OOM-fallible

This commit is contained in:
Idan Horowitz 2022-01-28 16:30:01 +02:00
parent 4d2f1a05ec
commit bd5b56cab0
4 changed files with 11 additions and 21 deletions

View file

@ -22,7 +22,7 @@ AHCIPortHandler::AHCIPortHandler(AHCIController& controller, u8 irq, AHCI::Maske
{
// FIXME: Use the number of taken ports to determine how many pages we should allocate.
for (size_t index = 0; index < (((size_t)AHCI::Limits::MaxPorts * 512) / PAGE_SIZE); index++) {
m_identify_metadata_pages.append(MM.allocate_supervisor_physical_page().release_nonnull());
m_identify_metadata_pages.append(MM.allocate_supervisor_physical_page().release_value_but_fixme_should_propagate_errors());
}
dbgln_if(AHCI_DEBUG, "AHCI Port Handler: IRQ {}", irq);