summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2020-09-19 14:11:15 +0300
committerAndreas Kling <kling@serenityos.org>2020-09-19 16:44:40 +0200
commit82b017181235d8baca940e2e7770572ae6e2209f (patch)
treef552174881f0d1c7df6eec88910a32f58ca25d4b
parent2cb32f83569579720c927fc43a8bc413755bd946 (diff)
downloadserenity-82b017181235d8baca940e2e7770572ae6e2209f.zip
Kernel: Fix assertion statement in GenericInterruptHandler
We need to assert if interrupts are not disabled when changing the interrupt number of an interrupt handler. Before this fix, any change like this would lead to a crash, because we are using InterruptDisabler in IRQHandler::change_irq_number.
-rw-r--r--Kernel/Interrupts/GenericInterruptHandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Interrupts/GenericInterruptHandler.cpp b/Kernel/Interrupts/GenericInterruptHandler.cpp
index 2101c705e8..609fb5e906 100644
--- a/Kernel/Interrupts/GenericInterruptHandler.cpp
+++ b/Kernel/Interrupts/GenericInterruptHandler.cpp
@@ -56,7 +56,7 @@ GenericInterruptHandler::~GenericInterruptHandler()
void GenericInterruptHandler::change_interrupt_number(u8 number)
{
- ASSERT_INTERRUPTS_ENABLED();
+ ASSERT_INTERRUPTS_DISABLED();
ASSERT(!m_disable_remap);
unregister_generic_interrupt_handler(InterruptManagement::acquire_mapped_interrupt_number(interrupt_number()), *this);
m_interrupt_number = number;