From c3ffb819432449ced1f1c3d98a94e5e630d0d173 Mon Sep 17 00:00:00 2001 From: Juergen Gross Date: Mon, 7 Nov 2011 14:37:51 +0000 Subject: [PATCH] avoid hypervisor panic when printing lock profiling information When printing lock profiling information via keyhandler in the hypervisor the system will panic. This patch corrects the problem. Signed-off-by: Juergen Gross Committed-by: Keir Fraser --- xen/common/spinlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index 14ecfd7f3d..ecf5b441df 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -458,9 +458,9 @@ static void spinlock_profile_print_elem(struct lock_profile *data, int32_t type, int32_t idx, void *par) { if ( type == LOCKPROF_TYPE_GLOBAL ) - printk("%s %s:\n", lock_profile_ancs[idx].name, data->name); + printk("%s %s:\n", lock_profile_ancs[type].name, data->name); else - printk("%s %d %s:\n", lock_profile_ancs[idx].name, idx, data->name); + printk("%s %d %s:\n", lock_profile_ancs[type].name, idx, data->name); printk(" lock:%12"PRId64"(%08X:%08X), block:%12"PRId64"(%08X:%08X)\n", data->lock_cnt, (u32)(data->time_hold >> 32), (u32)data->time_hold, data->block_cnt, (u32)(data->time_block >> 32), -- 2.30.2