diff options
author | Liav A <liavalb@gmail.com> | 2020-09-19 14:11:15 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-19 16:44:40 +0200 |
commit | 82b017181235d8baca940e2e7770572ae6e2209f (patch) | |
tree | f552174881f0d1c7df6eec88910a32f58ca25d4b | |
parent | 2cb32f83569579720c927fc43a8bc413755bd946 (diff) | |
download | serenity-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.cpp | 2 |
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; |