]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Jun 2012 16:47:37 +0000 (09:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Jun 2012 16:47:37 +0000 (09:47 -0700)
added patches:
nfsv4.1-fix-a-request-leak-on-the-back-channel.patch
xen-setup-filter-aperfmperf-cpuid-feature-out.patch

queue-3.0/nfsv4.1-fix-a-request-leak-on-the-back-channel.patch [new file with mode: 0644]
queue-3.0/series
queue-3.0/xen-setup-filter-aperfmperf-cpuid-feature-out.patch [new file with mode: 0644]

diff --git a/queue-3.0/nfsv4.1-fix-a-request-leak-on-the-back-channel.patch b/queue-3.0/nfsv4.1-fix-a-request-leak-on-the-back-channel.patch
new file mode 100644 (file)
index 0000000..6bb57ae
--- /dev/null
@@ -0,0 +1,31 @@
+From b3b02ae5865c2dcd506322e0fc6def59a042e72f Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+Date: Thu, 31 May 2012 15:26:38 -0400
+Subject: NFSv4.1: Fix a request leak on the back channel
+
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+
+commit b3b02ae5865c2dcd506322e0fc6def59a042e72f upstream.
+
+If the call to svc_process_common() fails, then the request
+needs to be freed before we can exit bc_svc_process.
+
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/sunrpc/svc.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/net/sunrpc/svc.c
++++ b/net/sunrpc/svc.c
+@@ -1302,7 +1302,8 @@ bc_svc_process(struct svc_serv *serv, st
+                                               sizeof(req->rq_snd_buf));
+               return bc_send(req);
+       } else {
+-              /* Nothing to do to drop request */
++              /* drop request */
++              xprt_free_bc_request(req);
+               return 0;
+       }
+ }
index 3f959e1bebe0466d9f5fa3f5db4597f3c4223867..567fd424393c4fa9ca3dea49070233436bfc134a 100644 (file)
@@ -1 +1,3 @@
 arm-i.mx-imx21ads-fix-overlapping-static-i-o-mappings.patch
+xen-setup-filter-aperfmperf-cpuid-feature-out.patch
+nfsv4.1-fix-a-request-leak-on-the-back-channel.patch
diff --git a/queue-3.0/xen-setup-filter-aperfmperf-cpuid-feature-out.patch b/queue-3.0/xen-setup-filter-aperfmperf-cpuid-feature-out.patch
new file mode 100644 (file)
index 0000000..0e62963
--- /dev/null
@@ -0,0 +1,56 @@
+From 5e626254206a709c6e937f3dda69bf26c7344f6f Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara@amd.com>
+Date: Tue, 29 May 2012 13:07:31 +0200
+Subject: xen/setup: filter APERFMPERF cpuid feature out
+
+From: Andre Przywara <andre.przywara@amd.com>
+
+commit 5e626254206a709c6e937f3dda69bf26c7344f6f upstream.
+
+Xen PV kernels allow access to the APERF/MPERF registers to read the
+effective frequency. Access to the MSRs is however redirected to the
+currently scheduled physical CPU, making consecutive read and
+compares unreliable. In addition each rdmsr traps into the hypervisor.
+So to avoid bogus readouts and expensive traps, disable the kernel
+internal feature flag for APERF/MPERF if running under Xen.
+This will
+a) remove the aperfmperf flag from /proc/cpuinfo
+b) not mislead the power scheduler (arch/x86/kernel/cpu/sched.c) to
+   use the feature to improve scheduling (by default disabled)
+c) not mislead the cpufreq driver to use the MSRs
+
+This does not cover userland programs which access the MSRs via the
+device file interface, but this will be addressed separately.
+
+Signed-off-by: Andre Przywara <andre.przywara@amd.com>
+Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/xen/enlighten.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/x86/xen/enlighten.c
++++ b/arch/x86/xen/enlighten.c
+@@ -198,6 +198,9 @@ static void __init xen_banner(void)
+              xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : "");
+ }
++#define CPUID_THERM_POWER_LEAF 6
++#define APERFMPERF_PRESENT 0
++
+ static __read_mostly unsigned int cpuid_leaf1_edx_mask = ~0;
+ static __read_mostly unsigned int cpuid_leaf1_ecx_mask = ~0;
+@@ -218,6 +221,11 @@ static void xen_cpuid(unsigned int *ax,
+               maskedx = cpuid_leaf1_edx_mask;
+               break;
++      case CPUID_THERM_POWER_LEAF:
++              /* Disabling APERFMPERF for kernel usage */
++              maskecx = ~(1 << APERFMPERF_PRESENT);
++              break;
++
+       case 0xb:
+               /* Suppress extended topology stuff */
+               maskebx = 0;