Trying to take a Lock while interrupts are disabled is always a bug.
@@ -52,6 +52,7 @@ private:
inline void Lock::lock()
{
+ ASSERT_INTERRUPTS_ENABLED();
ASSERT(!Scheduler::is_active());
for (;;) {
if (CAS(&m_lock, 1, 0) == 0) {