1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

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.
This commit is contained in:
Liav A 2020-09-19 14:11:15 +03:00 committed by Andreas Kling
parent 2cb32f8356
commit 82b0171812

View file

@ -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;