0d71e75f73
26369-libxl-devid.patch - fate##313584: pass bios information to XEN HVM guest 26554-hvm-firmware-passthrough.patch 26555-hvm-firmware-passthrough.patch 26556-hvm-firmware-passthrough.patch - Upstream patches from Jan 26516-ACPI-parse-table-retval.patch (Replaces CVE-2013-0153-xsa36.patch) 26517-AMD-IOMMU-clear-irtes.patch (Replaces CVE-2013-0153-xsa36.patch) 26518-AMD-IOMMU-disable-if-SATA-combined-mode.patch (Replaces CVE-2013-0153-xsa36.patch) 26519-AMD-IOMMU-perdev-intremap-default.patch (Replaces CVE-2013-0153-xsa36.patch) 26526-pvdrv-no-devinit.patch 26529-gcc48-build-fix.patch 26531-AMD-IOMMU-IVHD-special-missing.patch (Replaces CVE-2013-0153-xsa36.patch) 26532-AMD-IOMMU-phantom-MSI.patch 26536-xenoprof-div-by-0.patch 26576-x86-APICV-migration.patch 26577-x86-APICV-x2APIC.patch 26578-AMD-IOMMU-replace-BUG_ON.patch - bnc#797014 - no way to control live migrations 26547-tools-xc_fix_logic_error_in_stdiostream_progress.patch 26548-tools-xc_handle_tty_output_differently_in_stdiostream_progress.patch 26549-tools-xc_turn_XCFLAGS_*_into_shifts.patch 26550-tools-xc_restore_logging_in_xc_save.patch 26551-tools-xc_log_pid_in_xc_save-xc_restore_output.patch - PVonHVM: __devinit was removed in linux-3.8 OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=229
40 lines
980 B
Diff
40 lines
980 B
Diff
# HG changeset patch
|
|
# User Tim Deegan <tim@xen.org>
|
|
# Date 1360917722 -3600
|
|
# Node ID 0cca8a18432f08b342d76a753aa98559d892f592
|
|
# Parent 7af3c38ae187b351c5cea58e9eee482b50d814d8
|
|
xenoprof: avoid division by 0
|
|
|
|
Signed-off-by: Tim Deegan <tim@xen.org>
|
|
Acked-by: Jan Beulich <jbeulich@suse.com>
|
|
Acked-by: Keir Fraser <keir@xen.org>
|
|
Committed-by: Jan Beulich <jbeulich@suse.com>
|
|
|
|
--- a/xen/common/xenoprof.c
|
|
+++ b/xen/common/xenoprof.c
|
|
@@ -193,6 +193,13 @@ static int alloc_xenoprof_struct(
|
|
unsigned max_max_samples;
|
|
int i;
|
|
|
|
+ nvcpu = 0;
|
|
+ for_each_vcpu ( d, v )
|
|
+ nvcpu++;
|
|
+
|
|
+ if ( !nvcpu )
|
|
+ return -EINVAL;
|
|
+
|
|
d->xenoprof = xzalloc(struct xenoprof);
|
|
if ( d->xenoprof == NULL )
|
|
{
|
|
@@ -209,10 +216,6 @@ static int alloc_xenoprof_struct(
|
|
return -ENOMEM;
|
|
}
|
|
|
|
- nvcpu = 0;
|
|
- for_each_vcpu ( d, v )
|
|
- nvcpu++;
|
|
-
|
|
bufsize = sizeof(struct xenoprof_buf);
|
|
i = sizeof(struct event_log);
|
|
#ifdef CONFIG_COMPAT
|