console_force_unlock() might result in subsequent ASSERT() triggering
when CONFIG_DEBUG_LOCKS was active. Avoid that by calling
spin_debug_disable() in console_force_unlock() and make the spinlock
debug assertions trigger only if spin_debug was active.
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
static void rel_lock(union lock_debug *debug)
{
- ASSERT(debug->cpu == smp_processor_id());
+ if ( atomic_read(&spin_debug) > 0 )
+ ASSERT(debug->cpu == smp_processor_id());
debug->cpu = SPINLOCK_NO_CPU;
}
void console_force_unlock(void)
{
watchdog_disable();
+ spin_debug_disable();
spin_lock_init(&console_lock);
serial_force_unlock(sercon_handle);
console_locks_busted = 1;