From 72e831e9e9cf8ccfa194ffb5d65199bdc8670830 Mon Sep 17 00:00:00 2001 From: Liav A Date: Fri, 22 Oct 2021 20:31:42 +0300 Subject: [PATCH] Kernel/PCI: Ensure m_domains is not empty if scanning with memory access --- Kernel/Bus/PCI/Access.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Kernel/Bus/PCI/Access.cpp b/Kernel/Bus/PCI/Access.cpp index c1bded5a41..964afd7e24 100644 --- a/Kernel/Bus/PCI/Access.cpp +++ b/Kernel/Bus/PCI/Access.cpp @@ -309,6 +309,7 @@ UNMAP_AFTER_INIT void Access::rescan_hardware_with_memory_addressing() { MutexLocker locker(m_scan_lock); VERIFY(m_device_identifiers.is_empty()); + VERIFY(!m_domains.is_empty()); VERIFY(m_access_type == AccessType::Memory); for (u32 domain = 0; domain < m_domains.size(); domain++) { dbgln_if(PCI_DEBUG, "PCI: Scan memory mapped domain {}", domain);