mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:58:12 +00:00
Kernel: Don't treat read faults like CoW exceptions
I'm not sure why we would have a non-readable CoW region, but I suppose we could, so let's not Copy-on-Read in those cases.
This commit is contained in:
parent
af4cf01560
commit
945f8eb22a
2 changed files with 9 additions and 3 deletions
|
@ -437,7 +437,7 @@ PageFaultResponse MemoryManager::handle_page_fault(const PageFault& fault)
|
|||
return PageFaultResponse::Continue;
|
||||
}
|
||||
ASSERT(fault.type() == PageFault::Type::ProtectionViolation);
|
||||
if (region->should_cow(page_index_in_region)) {
|
||||
if (fault.access() == PageFault::Access::Write && region->should_cow(page_index_in_region)) {
|
||||
#ifdef PAGE_FAULT_DEBUG
|
||||
dbgprintf("PV(cow) fault in Region{%p}[%u]\n", region, page_index_in_region);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue