mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-07-14 16:50:23 +03:00
Kernel/riscv64: Only enable interrupts in trap handler if they were on
Always enabling interrupts is in hindsight obviously a bug, as trapping code that has interrupts disabled very likely expects that they stay disabled.
This commit is contained in:
parent
6a223c6210
commit
1a312f4265
@ -60,7 +60,8 @@ extern "C" void trap_handler(TrapFrame& trap_frame)
|
||||
// Exception
|
||||
|
||||
Processor::current().enter_trap(trap_frame, false);
|
||||
Processor::enable_interrupts();
|
||||
if (trap_frame.regs->sstatus.SPIE == 1)
|
||||
Processor::enable_interrupts();
|
||||
|
||||
using enum RISCV64::CSR::SCAUSE;
|
||||
switch (scause) {
|
||||
|
Loading…
Reference in New Issue
Block a user