[kernel] r15336 - in dists/lenny/linux-2.6/debian: . config patches/bugfix/x86 patches/features/all/openvz patches/series

Ben Hutchings benh at alioth.debian.org
Mon Mar 8 01:49:42 UTC 2010


Author: benh
Date: Mon Mar  8 01:49:40 2010
New Revision: 15336

Log:
Apply changes from 18abi but avoid/ignore ABI changes

bugfix/x86/hypervisor-detection-and-get-tsc_freq-from-hypervisor.patch,
bugfix/x86/add-a-synthetic-TSC_RELIABLE-feature-bit.patch:
Since hypervisor is not a per-CPU property, store it in a single static
variable not a new structure member.

features/all/openvz/0080-Endless-loop-in-__sk_stream_wait_memory.patch:
Ignore change of ub_sock_snd_queue_add() signature; no out-of-tree modules
should be using it.

Added:
   dists/lenny/linux-2.6/debian/patches/bugfix/x86/add-X86_FEATURE_HYPERVISOR-feature-bit.patch
      - copied unchanged from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/add-X86_FEATURE_HYPERVISOR-feature-bit.patch
   dists/lenny/linux-2.6/debian/patches/bugfix/x86/add-a-synthetic-TSC_RELIABLE-feature-bit.patch
      - copied, changed from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/add-a-synthetic-TSC_RELIABLE-feature-bit.patch
   dists/lenny/linux-2.6/debian/patches/bugfix/x86/add-a-synthetic-TS_RELIABLE-feature-bit.patch
      - copied unchanged from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/add-a-synthetic-TS_RELIABLE-feature-bit.patch
   dists/lenny/linux-2.6/debian/patches/bugfix/x86/hypervisor-detection-and-get-tsc_freq-from-hypervisor.patch
      - copied, changed from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/hypervisor-detection-and-get-tsc_freq-from-hypervisor.patch
   dists/lenny/linux-2.6/debian/patches/bugfix/x86/skip-verification-by-the-watchdog-for-TSC-clocksource.patch
      - copied unchanged from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/skip-verification-by-the-watchdog-for-TSC-clocksource.patch
   dists/lenny/linux-2.6/debian/patches/bugfix/x86/vmware-look-for-DMI-string-in-product-serial-key.patch
      - copied unchanged from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/vmware-look-for-DMI-string-in-product-serial-key.patch
   dists/lenny/linux-2.6/debian/patches/features/all/openvz/0080-Endless-loop-in-__sk_stream_wait_memory.patch
      - copied unchanged from r15333, dists/lenny/linux-2.6-abi/debian/patches/features/all/openvz/0080-Endless-loop-in-__sk_stream_wait_memory.patch
Modified:
   dists/lenny/linux-2.6/debian/changelog
   dists/lenny/linux-2.6/debian/config/defines
   dists/lenny/linux-2.6/debian/patches/series/22
   dists/lenny/linux-2.6/debian/patches/series/22-extra

Modified: dists/lenny/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny/linux-2.6/debian/changelog	Sun Mar  7 19:48:31 2010	(r15335)
+++ dists/lenny/linux-2.6/debian/changelog	Mon Mar  8 01:49:40 2010	(r15336)
@@ -6,6 +6,8 @@
   * [openvz] ddbec37 inotify: unblock umounting. (closes: #513537)
   * ALSA: cs4232: fix crash during chip PNP detection. (closes: #529697)
   * matroxfb: fix problems with display stability. (closes: #479652)
+  * [openvz] [UBC]: Endless loop in __sk_stream_wait_memory.
+    (closes: #542633)
 
   [ Moritz Muehlenhoff ]
   * Fix deadlock in saa7134-empress driver (Closes: #499671)
@@ -37,9 +39,11 @@
     - MSI is disabled on QLA24xx chips other than QLA2432 (MSI-X already was)
     - MSI-X is disabled if qlx2enablemsix=2
     - MSI and MSI-X are disabled if qlx2enablemsix=0
+  * Adjust fix for #524542 to avoid changing ABI
 
   [ dann frazier ]
   * Add be2net driver (Closes: #570428)
+  * Fix issues with tsc clocksource on VMWare (Closes: #524542)
 
   [ Ian Campbell ]
   * [xen/x86] Use correct form of PHYSDEVOP_map_pirq hypercall to prevent crash

Modified: dists/lenny/linux-2.6/debian/config/defines
==============================================================================
--- dists/lenny/linux-2.6/debian/config/defines	Sun Mar  7 19:48:31 2010	(r15335)
+++ dists/lenny/linux-2.6/debian/config/defines	Mon Mar  8 01:49:40 2010	(r15336)
@@ -1,6 +1,6 @@
 [abi]
 abiname: 2
-ignore-changes: gfn_* kvm_* __kvm_* emulate_instruction emulator_read_std emulator_write_emulated fx_init load_pdptrs saa7134_* saa_dsp_writel
+ignore-changes: gfn_* kvm_* __kvm_* emulate_instruction emulator_read_std emulator_write_emulated fx_init load_pdptrs saa7134_* saa_dsp_writel ub_sock_snd_queue_add
 
 [base]
 arches:

Copied: dists/lenny/linux-2.6/debian/patches/bugfix/x86/add-X86_FEATURE_HYPERVISOR-feature-bit.patch (from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/add-X86_FEATURE_HYPERVISOR-feature-bit.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/x86/add-X86_FEATURE_HYPERVISOR-feature-bit.patch	Mon Mar  8 01:49:40 2010	(r15336, copy of r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/add-X86_FEATURE_HYPERVISOR-feature-bit.patch)
@@ -0,0 +1,33 @@
+commit 49ab56ac6e1b907b7dadb72a4012460359feaf0e
+Author: Alok Kataria <akataria at vmware.com>
+Date:   Sat Nov 1 18:34:37 2008 -0700
+
+    x86: add X86_FEATURE_HYPERVISOR feature bit
+    
+    Impact: Number declaration only.
+    
+    Add X86_FEATURE_HYPERVISOR bit (CPUID level 1, ECX, bit 31).
+    
+    Signed-off-by: H. Peter Anvin <hpa at zytor.com>
+
+Backported to Debian's 2.6.26 by dann frazier <dannf at debian.org>
+
+diff -urpN a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h
+--- a/include/asm-x86/cpufeature.h	2009-07-16 14:25:56.000000000 -0600
++++ b/include/asm-x86/cpufeature.h	2009-07-16 14:28:37.000000000 -0600
+@@ -91,6 +91,7 @@
+ #define X86_FEATURE_CX16	(4*32+13) /* CMPXCHG16B */
+ #define X86_FEATURE_XTPR	(4*32+14) /* Send Task Priority Messages */
+ #define X86_FEATURE_DCA		(4*32+18) /* Direct Cache Access */
++#define X86_FEATURE_HYPERVISOR	(4*32+31) /* Running on a hypervisor */
+ 
+ /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
+ #define X86_FEATURE_XSTORE	(5*32+ 2) /* on-CPU RNG present (xstore insn) */
+@@ -188,6 +189,7 @@ extern const char * const x86_power_flag
+ #define cpu_has_gbpages		boot_cpu_has(X86_FEATURE_GBPAGES)
+ #define cpu_has_arch_perfmon	boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
+ #define cpu_has_pat		boot_cpu_has(X86_FEATURE_PAT)
++#define cpu_has_hypervisor	boot_cpu_has(X86_FEATURE_HYPERVISOR)
+ 
+ #if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
+ # define cpu_has_invlpg		1

Copied and modified: dists/lenny/linux-2.6/debian/patches/bugfix/x86/add-a-synthetic-TSC_RELIABLE-feature-bit.patch (from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/add-a-synthetic-TSC_RELIABLE-feature-bit.patch)
==============================================================================
--- dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/add-a-synthetic-TSC_RELIABLE-feature-bit.patch	Sat Mar  6 00:50:33 2010	(r15333, copy source)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/x86/add-a-synthetic-TSC_RELIABLE-feature-bit.patch	Mon Mar  8 01:49:40 2010	(r15336)
@@ -29,6 +29,7 @@
         Acked-by: Stefan Bader <stefan.bader at canonical.com>
 
 Adjusted to apply to Debian's 2.6.26 by dann frazier <dannf at debian.org>
+and Ben Hutchings <ben at decadent.org.uk>
 
 diff -urpN a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c
 --- a/arch/x86/kernel/cpu/hypervisor.c	2009-07-19 16:58:14.000000000 -0600
@@ -40,7 +41,7 @@
 +static inline void __cpuinit
 +hypervisor_set_feature_bits(struct cpuinfo_x86 *c)
 +{
-+	if (boot_cpu_data.x86_hyper_vendor == X86_HYPER_VENDOR_VMWARE) {
++	if (x86_hyper_vendor == X86_HYPER_VENDOR_VMWARE) {
 +		vmware_set_feature_bits(c);
 +		return;
 +	}

Copied: dists/lenny/linux-2.6/debian/patches/bugfix/x86/add-a-synthetic-TS_RELIABLE-feature-bit.patch (from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/add-a-synthetic-TS_RELIABLE-feature-bit.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/x86/add-a-synthetic-TS_RELIABLE-feature-bit.patch	Mon Mar  8 01:49:40 2010	(r15336, copy of r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/add-a-synthetic-TS_RELIABLE-feature-bit.patch)
@@ -0,0 +1,29 @@
+commit b2bcc7b299f37037b4a78dc1538e5d6508ae8110
+Author: Alok Kataria <akataria at vmware.com>
+Date:   Fri Oct 31 11:59:53 2008 -0700
+
+    x86: add a synthetic TSC_RELIABLE feature bit
+    
+    Impact: None, bit reservation only
+    
+    Add a synthetic TSC_RELIABLE feature bit which will be used to mark
+    TSC as reliable so that we could skip all the runtime checks for
+    TSC stablity, which have false positives in virtual environment.
+    
+    Signed-off-by: Alok N Kataria <akataria at vmware.com>
+    Signed-off-by: Dan Hecht <dhecht at vmware.com>
+    Signed-off-by: H. Peter Anvin <hpa at zytor.com>
+
+Backported to Debian's 2.6.26 by dann frazier <dannf at debian.org>
+
+diff -urpN a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h
+--- a/include/asm-x86/cpufeature.h	2008-07-13 15:51:29.000000000 -0600
++++ b/include/asm-x86/cpufeature.h	2009-07-16 14:25:56.000000000 -0600
+@@ -79,6 +79,7 @@
+ #define X86_FEATURE_REP_GOOD	(3*32+16) /* rep microcode works well on this CPU */
+ #define X86_FEATURE_MFENCE_RDTSC (3*32+17) /* Mfence synchronizes RDTSC */
+ #define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */
++#define X86_FEATURE_TSC_RELIABLE (3*32+23) /* TSC is known to be reliable */
+ 
+ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
+ #define X86_FEATURE_XMM3	(4*32+ 0) /* Streaming SIMD Extensions-3 */

Copied and modified: dists/lenny/linux-2.6/debian/patches/bugfix/x86/hypervisor-detection-and-get-tsc_freq-from-hypervisor.patch (from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/hypervisor-detection-and-get-tsc_freq-from-hypervisor.patch)
==============================================================================
--- dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/hypervisor-detection-and-get-tsc_freq-from-hypervisor.patch	Sat Mar  6 00:50:33 2010	(r15333, copy source)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/x86/hypervisor-detection-and-get-tsc_freq-from-hypervisor.patch	Mon Mar  8 01:49:40 2010	(r15336)
@@ -38,6 +38,7 @@
     Acked-by: Tim Gardner <tim.gardner at canonical.com>
 
 Backported to Debian's 2.6.26 by dann frazier <dannf at debian.org>
+and Ben Hutchings <ben at decadent.org.uk>
 
 diff -urpN a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
 --- a/arch/x86/kernel/cpu/common.c	2008-07-13 15:51:29.000000000 -0600
@@ -62,7 +63,7 @@
 diff -urpN a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c
 --- a/arch/x86/kernel/cpu/hypervisor.c	1969-12-31 17:00:00.000000000 -0700
 +++ b/arch/x86/kernel/cpu/hypervisor.c	2009-07-19 16:58:14.000000000 -0600
-@@ -0,0 +1,50 @@
+@@ -0,0 +1,54 @@
 +/*
 + * Common hypervisor code
 + *
@@ -92,19 +93,23 @@
 +#include <asm/vmware.h>
 +#include <asm/hypervisor.h>
 +
++static unsigned int x86_hyper_vendor;
++
 +static inline void __cpuinit
 +detect_hypervisor_vendor(struct cpuinfo_x86 *c)
 +{
++	if (c != &boot_cpu_data)
++		return;
 +	if (vmware_platform()) {
-+		c->x86_hyper_vendor = X86_HYPER_VENDOR_VMWARE;
++		x86_hyper_vendor = X86_HYPER_VENDOR_VMWARE;
 +	} else {
-+		c->x86_hyper_vendor = X86_HYPER_VENDOR_NONE;
++		x86_hyper_vendor = X86_HYPER_VENDOR_NONE;
 +	}
 +}
 +
 +unsigned long get_hypervisor_tsc_freq(void)
 +{
-+	if (boot_cpu_data.x86_hyper_vendor == X86_HYPER_VENDOR_VMWARE)
++	if (x86_hyper_vendor == X86_HYPER_VENDOR_VMWARE)
 +		return vmware_get_tsc_khz();
 +	return 0;
 +}
@@ -322,7 +327,7 @@
  
  static int notsc __initdata = 0;
  
-@@ -199,8 +200,17 @@ static unsigned long __init tsc_read_ref
+@@ -199,8 +200,16 @@ static unsigned long __init tsc_read_ref
  void __init tsc_calibrate(void)
  {
  	unsigned long flags, tsc1, tsc2, tr1, tr2, pm1, pm2, hpet1, hpet2;
@@ -333,8 +338,7 @@
 +	if (hypervisor_tsc_khz) {
 +		printk(KERN_INFO "TSC: Frequency read from the hypervisor\n");
 +		tsc_khz = hypervisor_tsc_khz;
-+		set_cyc2ns_scale(tsc_khz);
-+		return;
++		goto out;
 +	}
 +
  	local_irq_save(flags);
@@ -373,14 +377,6 @@
 diff -urpN a/include/asm-x86/processor.h b/include/asm-x86/processor.h
 --- a/include/asm-x86/processor.h	2008-07-13 15:51:29.000000000 -0600
 +++ b/include/asm-x86/processor.h	2009-07-19 17:00:56.000000000 -0600
-@@ -109,6 +109,7 @@ struct cpuinfo_x86 {
- 	/* Index into per_cpu list: */
- 	u16			cpu_index;
- #endif
-+	unsigned int x86_hyper_vendor;
- } __attribute__((__aligned__(SMP_CACHE_BYTES)));
- 
- #define X86_VENDOR_INTEL	0
 @@ -122,6 +123,9 @@ struct cpuinfo_x86 {
  
  #define X86_VENDOR_UNKNOWN	0xff

Copied: dists/lenny/linux-2.6/debian/patches/bugfix/x86/skip-verification-by-the-watchdog-for-TSC-clocksource.patch (from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/skip-verification-by-the-watchdog-for-TSC-clocksource.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/x86/skip-verification-by-the-watchdog-for-TSC-clocksource.patch	Mon Mar  8 01:49:40 2010	(r15336, copy of r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/skip-verification-by-the-watchdog-for-TSC-clocksource.patch)
@@ -0,0 +1,68 @@
+commit 0532dac67ee608e6f583549452ec07e9d2788af7
+Author: Alok Kataria <akataria at vmware.com>
+Date:   Mon Jan 26 21:00:22 2009 +0100
+
+    UBUNTU: x86: Skip verification by the watchdog for TSC clocksource.
+    
+    Bug: #319945
+    
+        Impact: Changes timekeeping on Vmware (or with tsc=reliable).
+    
+        This is achieved by resetting the CLOCKSOURCE_MUST_VERIFY flag.
+    
+        We add a tsc=reliable commandline option to enable this.
+        This enables legacy hardware without HPET, LAPIC, or ACPI timers
+        to enter high-resolution timer mode.
+    
+        Along with that have extended this to be used in virtualization environement
+        too. Now we also set this flag if the X86_FEATURE_TSC_RELIABLE bit is set.
+    
+        This is important since there is a wrap-around problem with the acpi_pm timer.
+        The acpi_pm counter is just 24bits and this can overflow in ~4 seconds. With
+        the NO_HZ kernels in virtualized environment, there can be situations when
+        the guest is descheduled for longer duration, as a result we may miss the wrap
+        of the acpi counter. When TSC is used as a clocksource and acpi_pm timer is
+        being used as the watchdog clocksource this error in acpi_pm results in TSC
+        being marked as unstable, and essentially results in time dropping in chunks
+        of 4 seconds whenever this wrap is missed. Since the virtualized TSC is
+        reliable on VMware, we should always use the TSCs clocksource on VMware, so
+        we skip the verfication at runtime, by checking for the feature bit.
+    
+        Since we reset the flag for mgeode systems too, i have combined
+        the mgeode case with the feature bit check.
+    
+        Signed-off-by: Jeff Hansen <jhansen at cardaccess-inc.com>
+        Signed-off-by: Alok N Kataria <akataria at vmware.com>
+        Signed-off-by: Dan Hecht <dhecht at vmware.com>
+        Signed-off-by: H. Peter Anvin <hpa at zytor.com>
+        Acked-by: Tim Gardner <tim.gardner at canonical.com>
+        Acked-by: Stefan Bader <stefan.bader at canonical.com>
+
+Adjusted to apply to Debian's 2.6.26 by dann frazier <dannf at debian.org>
+
+diff -urpN a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c
+--- a/arch/x86/kernel/tsc_32.c	2009-07-19 16:58:14.000000000 -0600
++++ b/arch/x86/kernel/tsc_32.c	2009-07-19 17:11:35.000000000 -0600
+@@ -446,6 +446,9 @@ void __init tsc_init(void)
+ 
+ 	unsynchronized_tsc();
+ 	check_geode_tsc_reliable();
++	if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE))
++		 clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
++
+ 	current_tsc_khz = tsc_khz;
+ 	clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz,
+ 							clocksource_tsc.shift);
+diff -urpN a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c
+--- a/arch/x86/kernel/tsc_64.c	2009-07-19 17:02:19.000000000 -0600
++++ b/arch/x86/kernel/tsc_64.c	2009-07-19 17:11:35.000000000 -0600
+@@ -357,6 +357,9 @@ EXPORT_SYMBOL_GPL(mark_tsc_unstable);
+ void __init init_tsc_clocksource(void)
+ {
+ 	if (!notsc) {
++		if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE))
++			clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
++
+ 		clocksource_tsc.mult = clocksource_khz2mult(tsc_khz,
+ 							clocksource_tsc.shift);
+ 		if (check_tsc_unstable())

Copied: dists/lenny/linux-2.6/debian/patches/bugfix/x86/vmware-look-for-DMI-string-in-product-serial-key.patch (from r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/vmware-look-for-DMI-string-in-product-serial-key.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/x86/vmware-look-for-DMI-string-in-product-serial-key.patch	Mon Mar  8 01:49:40 2010	(r15336, copy of r15333, dists/lenny/linux-2.6-abi/debian/patches/bugfix/x86/vmware-look-for-DMI-string-in-product-serial-key.patch)
@@ -0,0 +1,65 @@
+commit bb363507f6359762f368b09bf36309425768910a
+Author: Alok Kataria <akataria at vmware.com>
+Date:   Mon Jan 26 21:00:23 2009 +0100
+
+    UBUNTU: x86: vmware: look for DMI string in the product serial key
+    
+    Bug: #319945
+    
+        Impact: Should permit VMware detection on older platforms where the
+        vendor is changed.  Could theoretically cause a regression if some
+        weird serial number scheme contains the string "VMware" by pure
+        chance.  Seems unlikely, especially with the mixed case.
+    
+        In some user configured cases, VMware may choose not to put a VMware specific
+        DMI string, but the product serial key is always there and is VMware specific.
+        Add a interface to check the serial key, when checking for VMware in the DMI
+        information.
+    
+        Signed-off-by: Alok N Kataria <akataria at vmware.com>
+        Signed-off-by: H. Peter Anvin <hpa at zytor.com>
+        Acked-by: Tim Gardner <tim.gardner at canonical.com>
+        Acked-by: Stefan Bader <stefan.bader at canonical.com>
+
+Backported to Debian's 2.6.26 by dann frazier <dannf at debian.org>
+
+diff -urpN a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
+--- a/drivers/firmware/dmi_scan.c	2008-07-13 15:51:29.000000000 -0600
++++ b/drivers/firmware/dmi_scan.c	2009-07-19 17:15:17.000000000 -0600
+@@ -452,6 +452,17 @@ const char *dmi_get_system_info(int fiel
+ }
+ EXPORT_SYMBOL(dmi_get_system_info);
+ 
++/**
++ *	dmi_name_in_serial - 	Check if string is in the DMI product serial
++ *				information.
++ */
++int dmi_name_in_serial(const char *str)
++{
++	int f = DMI_PRODUCT_SERIAL;
++	if (dmi_ident[f] && strstr(dmi_ident[f], str))
++		return 1;
++	return 0;
++}
+ 
+ /**
+  *	dmi_name_in_vendors - Check if string is anywhere in the DMI vendor information.
+diff -urpN a/include/linux/dmi.h b/include/linux/dmi.h
+--- a/include/linux/dmi.h	2008-07-13 15:51:29.000000000 -0600
++++ b/include/linux/dmi.h	2009-07-19 17:15:17.000000000 -0600
+@@ -81,6 +81,7 @@ extern const struct dmi_device * dmi_fin
+ extern void dmi_scan_machine(void);
+ extern int dmi_get_year(int field);
+ extern int dmi_name_in_vendors(const char *str);
++extern int dmi_name_in_serial(const char *str);
+ extern int dmi_available;
+ extern int dmi_walk(void (*decode)(const struct dmi_header *));
+ 
+@@ -93,6 +94,7 @@ static inline const struct dmi_device * 
+ static inline void dmi_scan_machine(void) { return; }
+ static inline int dmi_get_year(int year) { return 0; }
+ static inline int dmi_name_in_vendors(const char *s) { return 0; }
++static inline int dmi_name_in_serial(const char *s) { return 0; }
+ #define dmi_available 0
+ static inline int dmi_walk(void (*decode)(const struct dmi_header *))
+ 	{ return -1; }

Copied: dists/lenny/linux-2.6/debian/patches/features/all/openvz/0080-Endless-loop-in-__sk_stream_wait_memory.patch (from r15333, dists/lenny/linux-2.6-abi/debian/patches/features/all/openvz/0080-Endless-loop-in-__sk_stream_wait_memory.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/features/all/openvz/0080-Endless-loop-in-__sk_stream_wait_memory.patch	Mon Mar  8 01:49:40 2010	(r15336, copy of r15333, dists/lenny/linux-2.6-abi/debian/patches/features/all/openvz/0080-Endless-loop-in-__sk_stream_wait_memory.patch)
@@ -0,0 +1,112 @@
+From 405d7028fa6af97c62302143d1369114e13cd47a Mon Sep 17 00:00:00 2001
+From: Denis V. Lunev <den at openvz.org>
+Date: Mon, 30 Jun 2008 11:05:14 +0400
+Subject: [PATCH] Endless loop in __sk_stream_wait_memory.
+
+[UBC]: Endless loop in __sk_stream_wait_memory.
+
+The loop in __sk_stream_wait_memory when tcp_sendmsg asks to wait for
+TCPSNDBUF space is endless when the timeout is not specified. The only way
+out is to queue a signal for that process.
+
+Lets return a status flag from ub_sock_snd_queue_add that UB space is
+available. This is enough to make a correct decision to leave the cycle.
+
+Signed-off-by: Denis V. Lunev <den at parallels.com>
+Signed-off-by: Pavel Emelyanov <xemul at sw.ru>
+Signed-off-by: Pavel Emelyanov <xemul at openvz.org>
+---
+ include/bc/net.h  |   10 +++++-----
+ kernel/bc/net.c   |    7 ++++---
+ net/core/stream.c |    4 ++--
+ 3 files changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/include/bc/net.h b/include/bc/net.h
+index cf323fb..31e532c 100644
+--- a/include/bc/net.h
++++ b/include/bc/net.h
+@@ -50,7 +50,7 @@ UB_DECLARE_VOID_FUNC(ub_sock_uncharge(struct sock *sk))
+ /* management of queue for send space */
+ UB_DECLARE_FUNC(long, ub_sock_wait_for_space(struct sock *sk, long timeo, 
+ 			unsigned long size))
+-UB_DECLARE_VOID_FUNC(ub_sock_snd_queue_add(struct sock *sk, int resource, 
++UB_DECLARE_FUNC(int, ub_sock_snd_queue_add(struct sock *sk, int resource, 
+ 			unsigned long size))
+ UB_DECLARE_VOID_FUNC(ub_sock_sndqueuedel(struct sock *sk))
+ 
+@@ -103,14 +103,14 @@ static inline void ub_sock_retwres_tcp(struct sock *sk, unsigned long size,
+ 	ub_sock_ret_wreserv(sk, UB_TCPSNDBUF, size, ressize);
+ }
+ 
+-static inline void ub_sock_sndqueueadd_other(struct sock *sk, unsigned long sz)
++static inline int ub_sock_sndqueueadd_other(struct sock *sk, unsigned long sz)
+ {
+-	ub_sock_snd_queue_add(sk, UB_OTHERSOCKBUF, sz);
++	return ub_sock_snd_queue_add(sk, UB_OTHERSOCKBUF, sz);
+ }
+ 
+-static inline void ub_sock_sndqueueadd_tcp(struct sock *sk, unsigned long sz)
++static inline int ub_sock_sndqueueadd_tcp(struct sock *sk, unsigned long sz)
+ {
+-	ub_sock_snd_queue_add(sk, UB_TCPSNDBUF, sz);
++	return ub_sock_snd_queue_add(sk, UB_TCPSNDBUF, sz);
+ }
+ 
+ static inline int ub_tcpsndbuf_charge(struct sock *sk,
+diff --git a/kernel/bc/net.c b/kernel/bc/net.c
+index 53bbd8f..e1ffc63 100644
+--- a/kernel/bc/net.c
++++ b/kernel/bc/net.c
+@@ -226,7 +226,7 @@ static void ub_tcp_snd_wakeup(struct user_beancounter *ub)
+ 	}
+ }
+ 
+-void ub_sock_snd_queue_add(struct sock *sk, int res, unsigned long size)
++int ub_sock_snd_queue_add(struct sock *sk, int res, unsigned long size)
+ {
+ 	unsigned long flags;
+ 	struct sock_beancounter *skbc;
+@@ -234,7 +234,7 @@ void ub_sock_snd_queue_add(struct sock *sk, int res, unsigned long size)
+ 	unsigned long added_reserv;
+ 
+ 	if (!sock_has_ubc(sk))
+-		return;
++		return 0;
+ 
+ 	skbc = sock_bc(sk);
+ 	ub = top_beancounter(skbc->ub);
+@@ -253,7 +253,7 @@ void ub_sock_snd_queue_add(struct sock *sk, int res, unsigned long size)
+ 		spin_unlock_irqrestore(&ub->ub_lock, flags);
+ 		if (added_reserv)
+ 			charge_beancounter_notop(skbc->ub, res, added_reserv);
+-		return;
++		return 0;
+ 	}
+ 
+ 	ub_debug(UBD_NET_SLEEP, "Adding sk to queue\n");
+@@ -278,6 +278,7 @@ void ub_sock_snd_queue_add(struct sock *sk, int res, unsigned long size)
+ 	}
+ out:
+ 	spin_unlock_irqrestore(&ub->ub_lock, flags);
++	return -ENOMEM;
+ }
+ 
+ EXPORT_SYMBOL(ub_sock_snd_queue_add);
+diff --git a/net/core/stream.c b/net/core/stream.c
+index 5c39418..cd7c99b 100644
+--- a/net/core/stream.c
++++ b/net/core/stream.c
+@@ -139,8 +139,8 @@ int __sk_stream_wait_memory(struct sock *sk, long *timeo_p,
+ 		if (amount == 0) {
+ 			if (sk_stream_memory_free(sk) && !vm_wait)
+ 				break;
+-		} else
+-			ub_sock_sndqueueadd_tcp(sk, amount);
++		} else if (!ub_sock_sndqueueadd_tcp(sk, amount))
++			break;
+ 
+ 		set_bit(SOCK_NOSPACE, &sk->sk_socket->flags);
+ 		sk->sk_write_pending++;
+-- 
+1.6.3.3
+

Modified: dists/lenny/linux-2.6/debian/patches/series/22
==============================================================================
--- dists/lenny/linux-2.6/debian/patches/series/22	Sun Mar  7 19:48:31 2010	(r15335)
+++ dists/lenny/linux-2.6/debian/patches/series/22	Mon Mar  8 01:49:40 2010	(r15336)
@@ -23,6 +23,10 @@
 + bugfix/all/yealink-reliably-kill-urbs.patch
 + bugfix/all/ipv6-fix-pending-dad.patch
 + features/all/ata-piix-add-intel-pci-ids.patch
-
-
 + bugfix/all/qla2xxx-disable-broken-msi.patch
++ bugfix/x86/add-a-synthetic-TS_RELIABLE-feature-bit.patch
++ bugfix/x86/add-X86_FEATURE_HYPERVISOR-feature-bit.patch
++ bugfix/x86/vmware-look-for-DMI-string-in-product-serial-key.patch
++ bugfix/x86/hypervisor-detection-and-get-tsc_freq-from-hypervisor.patch
++ bugfix/x86/add-a-synthetic-TSC_RELIABLE-feature-bit.patch
++ bugfix/x86/skip-verification-by-the-watchdog-for-TSC-clocksource.patch

Modified: dists/lenny/linux-2.6/debian/patches/series/22-extra
==============================================================================
--- dists/lenny/linux-2.6/debian/patches/series/22-extra	Sun Mar  7 19:48:31 2010	(r15335)
+++ dists/lenny/linux-2.6/debian/patches/series/22-extra	Mon Mar  8 01:49:40 2010	(r15336)
@@ -2,3 +2,4 @@
 + features/all/openvz/0088-cfq-unlink-queues-at-bc-destroy.patch featureset=openvz
 + features/all/openvz/0089-inotify-unblock-umounting.patch featureset=openvz
 + features/all/xen/xen-fix-msi-hypercall.patch featureset=xen
++ features/all/openvz/0080-Endless-loop-in-__sk_stream_wait_memory.patch featureset=openvz



More information about the Kernel-svn-changes mailing list