Mark allocated p2frame used *before* freelist unlock.

This commit is contained in:
4lDO2
2024-03-26 17:01:59 +01:00
parent 168692f09d
commit 2f1551a6bb
+1 -1
View File
@@ -99,8 +99,8 @@ pub fn allocate_p2frame_complex(_req_order: u32, flags: (), strategy: Option<()>
freelist.used_frames += 1 << min_order;
drop(freelist);
info.mark_used();
drop(freelist);
unsafe {
(RmmA::phys_to_virt(frame.start_address()).data() as *mut u8).write_bytes(0, PAGE_SIZE << min_order);