xen: make CONFIG_DEBUG_LOCKS usable without CONFIG_DEBUG

In expert mode it is possible to enable CONFIG_DEBUG_LOCKS without
having enabled CONFIG_DEBUG. The coding is depending on CONFIG_DEBUG
as it is using ASSERT(), however.

Fix that by using BUG_ON() instead of ASSERT() in rel_lock().

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Juergen Gross authored and Andrew Cooper committed 2020-01-24 15:16:23 +00:00
1 parent d3d86f711a
commit e8660f82c9
1 file changed
+1 -1
+1 -1
View File
@@ -86,7 +86,7 @@ static void got_lock(union lock_debug *debug)
static void rel_lock(union lock_debug *debug)
{
if ( atomic_read(&spin_debug) > 0 )
ASSERT(debug->cpu == smp_processor_id());
BUG_ON(debug->cpu != smp_processor_id());
debug->cpu = SPINLOCK_NO_CPU;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.