SHA256
1
0
forked from pool/xen
xen/521db25f-Fix-inactive-timer-list-corruption-on-second-S3-resume.patch
Charles Arnold 1d11625a98 - Upstream patches from Jan
521c6d4a-x86-don-t-allow-Dom0-access-to-the-MSI-address-range.patch
  521c6d6c-x86-don-t-allow-Dom0-access-to-the-HT-address-range.patch
  521c6e23-x86-Intel-add-support-for-Haswell-CPU-models.patch
  521db25f-Fix-inactive-timer-list-corruption-on-second-S3-resume.patch
  521e1156-x86-AVX-instruction-emulation-fixes.patch
  521ef8d9-AMD-IOMMU-add-missing-checks.patch
  52205a7d-hvmloader-smbios-Correctly-count-the-number-of-tables-written.patch
  52205a90-public-hvm_xs_strings.h-Fix-ABI-regression-for-OEM-SMBios-strings.patch
  52205e27-x86-xsave-initialization-improvements.patch
  5226020f-xend-handle-extended-PCI-configuration-space-when-saving-state.patch
  52260214-xend-fix-file-descriptor-leak-in-pci-utilities.patch
  52285317-hvmloader-fix-SeaBIOS-interface.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=271
2013-09-09 15:27:39 +00:00

43 lines
1.7 KiB
Diff

# Commit 9e2c5938246546a5b3f698b7421640d85602b994
# Date 2013-08-28 10:18:39 +0200
# Author Tomasz Wroblewski <tomasz.wroblewski@citrix.com>
# Committer Jan Beulich <jbeulich@suse.com>
Fix inactive timer list corruption on second S3 resume
init_timer cannot be safely called multiple times on same timer since it does memset(0)
on the structure, erasing the auxiliary member used by linked list code. This breaks
inactive timer list in common/timer.c.
Moved resume_timer initialisation to ns16550_init_postirq, so it's only done once.
Signed-off-by: Tomasz Wroblewski <tomasz.wroblewski@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
--- 2013-08-30.orig/xen/drivers/char/ns16550.c 2013-07-09 20:57:12.000000000 +0200
+++ 2013-08-30/xen/drivers/char/ns16550.c 2013-09-06 13:46:19.000000000 +0200
@@ -128,6 +128,8 @@ static struct ns16550 {
#define RESUME_DELAY MILLISECS(10)
#define RESUME_RETRIES 100
+static void ns16550_delayed_resume(void *data);
+
static char ns_read_reg(struct ns16550 *uart, int reg)
{
if ( uart->remapped_io_base == NULL )
@@ -323,6 +325,7 @@ static void __init ns16550_init_postirq(
serial_async_transmit(port);
init_timer(&uart->timer, ns16550_poll, port, 0);
+ init_timer(&uart->resume_timer, ns16550_delayed_resume, port, 0);
/* Calculate time to fill RX FIFO and/or empty TX FIFO for polling. */
bits = uart->data_bits + uart->stop_bits + !!uart->parity;
@@ -413,7 +416,6 @@ static void ns16550_resume(struct serial
if ( ns16550_ioport_invalid(uart) )
{
delayed_resume_tries = RESUME_RETRIES;
- init_timer(&uart->resume_timer, ns16550_delayed_resume, port, 0);
set_timer(&uart->resume_timer, NOW() + RESUME_DELAY);
}
else