diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-02-01 09:10:26 -0500 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-02-01 09:10:26 -0500 |
commit | f8942052f2a71c2603fbc4b91303137d07151e72 (patch) | |
tree | eb38d10cfc7bc45d10c48290c3b829e5cce041c3 | |
parent | 24ac72db9322277e25df56839963f19f0796fdb7 (diff) |
virtual_mm: find_free_addresses() should get the table if the table is
present, not the other way around
-rw-r--r-- | kernel/mm/virtual_mm/virtual_mm.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/mm/virtual_mm/virtual_mm.cc b/kernel/mm/virtual_mm/virtual_mm.cc index 25a353f..401113b 100644 --- a/kernel/mm/virtual_mm/virtual_mm.cc +++ b/kernel/mm/virtual_mm/virtual_mm.cc @@ -175,7 +175,7 @@ find_free_addresses(uint32_t n) uint32_t *table = 0; bool table_is_present = PDE_IS_PRESENT(pd_entry); - if (!table_is_present) + if (table_is_present) table = (uint32_t *) PDE_GET_TABLE(pd_entry); for (uint32_t starting_pt_index = 0; starting_pt_index < PAGE_TABLE_SIZE; |