mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:17:35 +00:00
Kernel: The inode fault handler should grab the VMObject lock earlier
It doesn't look healthy to create raw references into an array before a temporary unlock. In fact, that temporary unlock looks generally unhealthy, but it's a different problem.
This commit is contained in:
parent
a9d7902bb7
commit
00d8ec3ead
1 changed files with 3 additions and 2 deletions
|
@ -433,13 +433,14 @@ PageFaultResponse Region::handle_inode_fault(size_t page_index_in_region)
|
||||||
{
|
{
|
||||||
ASSERT_INTERRUPTS_DISABLED();
|
ASSERT_INTERRUPTS_DISABLED();
|
||||||
ASSERT(vmobject().is_inode());
|
ASSERT(vmobject().is_inode());
|
||||||
auto& inode_vmobject = static_cast<InodeVMObject&>(vmobject());
|
|
||||||
auto& vmobject_physical_page_entry = inode_vmobject.physical_pages()[first_page_index() + page_index_in_region];
|
|
||||||
|
|
||||||
sti();
|
sti();
|
||||||
LOCKER(vmobject().m_paging_lock);
|
LOCKER(vmobject().m_paging_lock);
|
||||||
cli();
|
cli();
|
||||||
|
|
||||||
|
auto& inode_vmobject = static_cast<InodeVMObject&>(vmobject());
|
||||||
|
auto& vmobject_physical_page_entry = inode_vmobject.physical_pages()[first_page_index() + page_index_in_region];
|
||||||
|
|
||||||
#ifdef PAGE_FAULT_DEBUG
|
#ifdef PAGE_FAULT_DEBUG
|
||||||
dbg() << "Inode fault in " << name() << " page index: " << page_index_in_region;
|
dbg() << "Inode fault in " << name() << " page index: " << page_index_in_region;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue