mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
Kernel: Fix crash when reading /proc/PID/vmobjects
InodeVMObjects can have nulled-out physical page slots. That just means we haven't cached that page from disk right now.
This commit is contained in:
parent
59b9e49bcd
commit
04e40da188
1 changed files with 2 additions and 1 deletions
|
@ -235,7 +235,8 @@ NonnullOwnPtr<Region> Region::create_kernel_only(const Range& range, const Strin
|
|||
|
||||
bool Region::should_cow(size_t page_index) const
|
||||
{
|
||||
if (vmobject().physical_pages()[page_index]->is_shared_zero_page())
|
||||
auto& slot = vmobject().physical_pages()[page_index];
|
||||
if (slot && slot->is_shared_zero_page())
|
||||
return true;
|
||||
if (m_shared)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue