Kernel: Fix possible crash during exec
This commit is contained in:
parent
706cfeb443
commit
cea19ecc31
|
@ -717,6 +717,11 @@ namespace Kernel
|
||||||
new_thread->set_tls(tls_result.addr);
|
new_thread->set_tls(tls_result.addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE: this is done before disabling interrupts and moving the threads as
|
||||||
|
// shared filebacked mmap can write to disk on on clearing, this will lock
|
||||||
|
// filesystem mutex which can yield
|
||||||
|
m_mapped_regions.clear();
|
||||||
|
|
||||||
ASSERT(Processor::get_interrupt_state() == InterruptState::Enabled);
|
ASSERT(Processor::get_interrupt_state() == InterruptState::Enabled);
|
||||||
Processor::set_interrupt_state(InterruptState::Disabled);
|
Processor::set_interrupt_state(InterruptState::Disabled);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue