e46082b3ea
530b27fd-x86-MCE-Fix-race-condition-in-mctelem_reserve.patch 530b2880-Nested-VMX-update-nested-paging-mode-on-vmexit.patch 530b28c5-x86-MSI-don-t-risk-division-by-zero.patch 530c54c3-x86-mce-Reduce-boot-time-logspam.patch 5310bac3-mm-ensure-useful-progress-in-decrease_reservation.patch 5315a254-IOMMU-generalize-and-correct-softirq-processing.patch 5315a3bb-x86-don-t-propagate-acpi_skip_timer_override-do-Dom0.patch 5315a43a-x86-ACPI-also-print-address-space-for-PM1x-fields.patch 531d8db1-x86-hvm-refine-the-judgment-on-IDENT_PT-for-EMT.patch 531d8e09-x86-HVM-fix-memory-type-merging-in-epte_get_entry_emt.patch 531d8e34-x86-HVM-consolidate-passthrough-handling-in-epte_get_entry_emt.patch 531d8fd0-kexec-identify-which-cpu-the-kexec-image-is-being-executed-on.patch 531dc0e2-xmalloc-handle-correctly-page-allocation-when-align-size.patch - Add conversion tool for migrating xend/xm managed VMs to libvirt xen2libvirt.py (Jim Fehlig) OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=304
25 lines
847 B
Diff
25 lines
847 B
Diff
# Commit 5d160d913e03b581bdddde73535c18ac670cf0a9
|
|
# Date 2014-02-24 12:11:01 +0100
|
|
# Author Jan Beulich <jbeulich@suse.com>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
x86/MSI: don't risk division by zero
|
|
|
|
The check in question is redundant with the one in the immediately
|
|
following if(), where dividing by zero gets carefully avoided.
|
|
|
|
Spotted-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
|
|
|
|
--- a/xen/arch/x86/msi.c
|
|
+++ b/xen/arch/x86/msi.c
|
|
@@ -636,7 +636,7 @@ static u64 read_pci_mem_bar(u16 seg, u8
|
|
return 0;
|
|
base = pos + PCI_SRIOV_BAR;
|
|
vf -= PCI_BDF(bus, slot, func) + offset;
|
|
- if ( vf < 0 || (vf && vf % stride) )
|
|
+ if ( vf < 0 )
|
|
return 0;
|
|
if ( stride )
|
|
{
|