]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Oct 2012 05:27:37 +0000 (22:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Oct 2012 05:27:37 +0000 (22:27 -0700)
added patches:
arch-tile-avoid-generating-.eh_frame-information-in-modules.patch
ext4-avoid-underflow-in-ext4_trim_fs.patch
nohz-fix-idle-ticks-in-cpu-summary-line-of-proc-stat.patch

queue-3.4/arch-tile-avoid-generating-.eh_frame-information-in-modules.patch [new file with mode: 0644]
queue-3.4/ext4-avoid-underflow-in-ext4_trim_fs.patch [new file with mode: 0644]
queue-3.4/nohz-fix-idle-ticks-in-cpu-summary-line-of-proc-stat.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/arch-tile-avoid-generating-.eh_frame-information-in-modules.patch b/queue-3.4/arch-tile-avoid-generating-.eh_frame-information-in-modules.patch
new file mode 100644 (file)
index 0000000..65d9b6f
--- /dev/null
@@ -0,0 +1,37 @@
+From 627072b06c362bbe7dc256f618aaa63351f0cfe6 Mon Sep 17 00:00:00 2001
+From: Chris Metcalf <cmetcalf@tilera.com>
+Date: Fri, 19 Oct 2012 11:43:11 -0400
+Subject: arch/tile: avoid generating .eh_frame information in modules
+
+From: Chris Metcalf <cmetcalf@tilera.com>
+
+commit 627072b06c362bbe7dc256f618aaa63351f0cfe6 upstream.
+
+The tile tool chain uses the .eh_frame information for backtracing.
+The vmlinux build drops any .eh_frame sections at link time, but when
+present in kernel modules, it causes a module load failure due to the
+presence of unsupported pc-relative relocations.  When compiling to
+use compiler feedback support, the compiler by default omits .eh_frame
+information, so we don't see this problem.  But when not using feedback,
+we need to explicitly suppress the .eh_frame.
+
+Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/tile/Makefile |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/arch/tile/Makefile
++++ b/arch/tile/Makefile
+@@ -26,6 +26,10 @@ $(error Set TILERA_ROOT or CROSS_COMPILE
+   endif
+ endif
++# The tile compiler may emit .eh_frame information for backtracing.
++# In kernel modules, this causes load failures due to unsupported relocations.
++KBUILD_CFLAGS   += -fno-asynchronous-unwind-tables
++
+ ifneq ($(CONFIG_DEBUG_EXTRA_FLAGS),"")
+ KBUILD_CFLAGS   += $(CONFIG_DEBUG_EXTRA_FLAGS)
+ endif
diff --git a/queue-3.4/ext4-avoid-underflow-in-ext4_trim_fs.patch b/queue-3.4/ext4-avoid-underflow-in-ext4_trim_fs.patch
new file mode 100644 (file)
index 0000000..8e6e701
--- /dev/null
@@ -0,0 +1,37 @@
+From 5de35e8d5c02d271c20e18337e01bc20e6ef472e Mon Sep 17 00:00:00 2001
+From: Lukas Czerner <lczerner@redhat.com>
+Date: Mon, 22 Oct 2012 18:01:19 -0400
+Subject: ext4: Avoid underflow in ext4_trim_fs()
+
+From: Lukas Czerner <lczerner@redhat.com>
+
+commit 5de35e8d5c02d271c20e18337e01bc20e6ef472e upstream.
+
+Currently if len argument in ext4_trim_fs() is smaller than one block,
+the 'end' variable underflow. Avoid that by returning EINVAL if len is
+smaller than file system block.
+
+Also remove useless unlikely().
+
+Signed-off-by: Lukas Czerner <lczerner@redhat.com>
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ext4/mballoc.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/fs/ext4/mballoc.c
++++ b/fs/ext4/mballoc.c
+@@ -4984,8 +4984,9 @@ int ext4_trim_fs(struct super_block *sb,
+       end = start + (range->len >> sb->s_blocksize_bits) - 1;
+       minlen = range->minlen >> sb->s_blocksize_bits;
+-      if (unlikely(minlen > EXT4_CLUSTERS_PER_GROUP(sb)) ||
+-          unlikely(start >= max_blks))
++      if (minlen > EXT4_CLUSTERS_PER_GROUP(sb) ||
++          start >= max_blks ||
++          range->len < sb->s_blocksize)
+               return -EINVAL;
+       if (end >= max_blks)
+               end = max_blks - 1;
diff --git a/queue-3.4/nohz-fix-idle-ticks-in-cpu-summary-line-of-proc-stat.patch b/queue-3.4/nohz-fix-idle-ticks-in-cpu-summary-line-of-proc-stat.patch
new file mode 100644 (file)
index 0000000..0bf4415
--- /dev/null
@@ -0,0 +1,75 @@
+From 7386cdbf2f57ea8cff3c9fde93f206e58b9fe13f Mon Sep 17 00:00:00 2001
+From: Michal Hocko <mhocko@suse.cz>
+Date: Wed, 10 Oct 2012 11:51:09 +0530
+Subject: nohz: Fix idle ticks in cpu summary line of /proc/stat
+
+From: Michal Hocko <mhocko@suse.cz>
+
+commit 7386cdbf2f57ea8cff3c9fde93f206e58b9fe13f upstream.
+
+Git commit 09a1d34f8535ecf9 "nohz: Make idle/iowait counter update
+conditional" introduced a bug in regard to cpu hotplug. The effect is
+that the number of idle ticks in the cpu summary line in /proc/stat is
+still counting ticks for offline cpus.
+
+Reproduction is easy, just start a workload that keeps all cpus busy,
+switch off one or more cpus and then watch the idle field in top.
+On a dual-core with one cpu 100% busy and one offline cpu you will get
+something like this:
+
+%Cpu(s): 48.7 us,  1.3 sy,  0.0 ni, 50.0 id,  0.0 wa,  0.0 hi,  0.0 si,
+%0.0 st
+
+The problem is that an offline cpu still has ts->idle_active == 1.
+To fix this we should make sure that the cpu is online when calling
+get_cpu_idle_time_us and get_cpu_iowait_time_us.
+
+[Srivatsa: Rebased to current mainline]
+
+Reported-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Michal Hocko <mhocko@suse.cz>
+Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
+Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
+Link: http://lkml.kernel.org/r/20121010061820.8999.57245.stgit@srivatsabhat.in.ibm.com
+Cc: deepthi@linux.vnet.ibm.com
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/proc/stat.c |   14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+--- a/fs/proc/stat.c
++++ b/fs/proc/stat.c
+@@ -45,10 +45,13 @@ static cputime64_t get_iowait_time(int c
+ static u64 get_idle_time(int cpu)
+ {
+-      u64 idle, idle_time = get_cpu_idle_time_us(cpu, NULL);
++      u64 idle, idle_time = -1ULL;
++
++      if (cpu_online(cpu))
++              idle_time = get_cpu_idle_time_us(cpu, NULL);
+       if (idle_time == -1ULL)
+-              /* !NO_HZ so we can rely on cpustat.idle */
++              /* !NO_HZ or cpu offline so we can rely on cpustat.idle */
+               idle = kcpustat_cpu(cpu).cpustat[CPUTIME_IDLE];
+       else
+               idle = usecs_to_cputime64(idle_time);
+@@ -58,10 +61,13 @@ static u64 get_idle_time(int cpu)
+ static u64 get_iowait_time(int cpu)
+ {
+-      u64 iowait, iowait_time = get_cpu_iowait_time_us(cpu, NULL);
++      u64 iowait, iowait_time = -1ULL;
++
++      if (cpu_online(cpu))
++              iowait_time = get_cpu_iowait_time_us(cpu, NULL);
+       if (iowait_time == -1ULL)
+-              /* !NO_HZ so we can rely on cpustat.iowait */
++              /* !NO_HZ or cpu offline so we can rely on cpustat.iowait */
+               iowait = kcpustat_cpu(cpu).cpustat[CPUTIME_IOWAIT];
+       else
+               iowait = usecs_to_cputime64(iowait_time);
index 8e5d04a216999c768301cc643520e44b05e86c0b..17b73173d7cd9e108c9c8706f456e39f5dfad71a 100644 (file)
@@ -1 +1,4 @@
 ext4-race-condition-protection-for-ext4_convert_unwritten_extents_endio.patch
+ext4-avoid-underflow-in-ext4_trim_fs.patch
+nohz-fix-idle-ticks-in-cpu-summary-line-of-proc-stat.patch
+arch-tile-avoid-generating-.eh_frame-information-in-modules.patch