xentrace: fix bug in t_info size
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 10 May 2010 08:22:52 +0000 (09:22 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 10 May 2010 08:22:52 +0000 (09:22 +0100)
t_info size should be in bytes, not pages.  This fixes a bug
that crashes the hypervisor if the total number of all pages
is more than 1024 but less than 2048.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
xen/common/trace.c

index 110f3b8c7d697abde6373389286ab9e477764a5e..cc29c8b970a57c8f2847ed285aa025401aef4206 100644 (file)
@@ -340,7 +340,7 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc)
     case XEN_SYSCTL_TBUFOP_get_info:
         tbc->evt_mask   = tb_event_mask;
         tbc->buffer_mfn = t_info ? virt_to_mfn(t_info) : 0;
-        tbc->size = T_INFO_PAGES;
+        tbc->size = T_INFO_PAGES * PAGE_SIZE;
         break;
     case XEN_SYSCTL_TBUFOP_set_cpu_mask:
         xenctl_cpumap_to_cpumask(&tb_cpu_mask, &tbc->cpu_mask);