8724a18868
config handling stack overflow 55a62eb0-xl-correct-handling-of-extra_config-in-main_cpupoolcreate.patch - bsc#907514 - Bus fatal error & sles12 sudden reboot has been observed - bsc#910258 - SLES12 Xen host crashes with FATAL NMI after shutdown of guest with VT-d NIC - bsc#918984 - Bus fatal error & sles11-SP4 sudden reboot has been observed - bsc#923967 - Partner-L3: Bus fatal error & sles11-SP3 sudden reboot has been observed 552d293b-x86-vMSI-X-honor-all-mask-requests.patch 552d2966-x86-vMSI-X-add-valid-bits-for-read-acceleration.patch 5576f143-x86-adjust-PV-I-O-emulation-functions-types.patch 55795a52-x86-vMSI-X-support-qword-MMIO-access.patch 5583d9c5-x86-MSI-X-cleanup.patch 5583da09-x86-MSI-track-host-and-guest-masking-separately.patch 55b0a218-x86-PCI-CFG-write-intercept.patch 55b0a255-x86-MSI-X-maskall.patch 55b0a283-x86-MSI-X-teardown.patch 55b0a2ab-x86-MSI-X-enable.patch 55b0a2db-x86-MSI-track-guest-masking.patch - Upstream patches from Jan 552d0f49-x86-traps-identify-the-vcpu-in-context-when-dumping-regs.patch 559bc633-x86-cpupool-clear-proper-cpu_valid-bit-on-CPU-teardown.patch 559bc64e-credit1-properly-deal-with-CPUs-not-in-any-pool.patch 559bc87f-x86-hvmloader-avoid-data-corruption-with-xenstore-rw.patch 55a66a1e-make-rangeset_report_ranges-report-all-ranges.patch 55a77e4f-dmar-device-scope-mem-leak-fix.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=373
64 lines
1.8 KiB
Diff
64 lines
1.8 KiB
Diff
# Commit a7bd9b1661304500cd18b7d216d616ecf053ebdb
|
|
# Date 2015-08-05 10:32:45 +0100
|
|
# Author Andrew Cooper <andrew.cooper3@citrix.com>
|
|
# Committer Ian Campbell <ian.campbell@citrix.com>
|
|
x86/gdt: Drop write-only, xalloc()'d array from set_gdt()
|
|
|
|
It is not used, and can cause a spurious failure of the set_gdt() hypercall in
|
|
low memory situations.
|
|
|
|
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
|
|
Reviewed-by: Ian Campbell <ian.campbell@citrix.com>
|
|
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
|
|
|
|
--- a/xen/arch/x86/mm.c
|
|
+++ b/xen/arch/x86/mm.c
|
|
@@ -4383,20 +4383,15 @@ long set_gdt(struct vcpu *v,
|
|
l1_pgentry_t *pl1e;
|
|
/* NB. There are 512 8-byte entries per GDT page. */
|
|
int i, nr_pages = (entries + 511) / 512;
|
|
- unsigned long mfn, *pfns;
|
|
|
|
if ( entries > FIRST_RESERVED_GDT_ENTRY )
|
|
return -EINVAL;
|
|
|
|
- pfns = xmalloc_array(unsigned long, nr_pages);
|
|
- if ( !pfns )
|
|
- return -ENOMEM;
|
|
-
|
|
/* Check the pages in the new GDT. */
|
|
for ( i = 0; i < nr_pages; i++ )
|
|
{
|
|
struct page_info *page;
|
|
- pfns[i] = frames[i];
|
|
+
|
|
page = get_page_from_gfn(d, frames[i], NULL, P2M_ALLOC);
|
|
if ( !page )
|
|
goto fail;
|
|
@@ -4405,7 +4400,7 @@ long set_gdt(struct vcpu *v,
|
|
put_page(page);
|
|
goto fail;
|
|
}
|
|
- mfn = frames[i] = page_to_mfn(page);
|
|
+ frames[i] = page_to_mfn(page);
|
|
}
|
|
|
|
/* Tear down the old GDT. */
|
|
@@ -4420,7 +4415,6 @@ long set_gdt(struct vcpu *v,
|
|
l1e_write(&pl1e[i], l1e_from_pfn(frames[i], __PAGE_HYPERVISOR));
|
|
}
|
|
|
|
- xfree(pfns);
|
|
return 0;
|
|
|
|
fail:
|
|
@@ -4428,7 +4422,6 @@ long set_gdt(struct vcpu *v,
|
|
{
|
|
put_page_and_type(mfn_to_page(frames[i]));
|
|
}
|
|
- xfree(pfns);
|
|
return -EINVAL;
|
|
}
|
|
|