]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Oct 2012 05:38:15 +0000 (22:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Oct 2012 05:38:15 +0000 (22:38 -0700)
added patches:
arch-tile-avoid-generating-.eh_frame-information-in-modules.patch
ext4-avoid-underflow-in-ext4_trim_fs.patch
ext4-checksum-the-block-bitmap-properly-with-bigalloc-enabled.patch
hwmon-coretemp-add-support-for-atom-ce4110-4150-4170.patch
nohz-fix-idle-ticks-in-cpu-summary-line-of-proc-stat.patch
usbdevfs-fix-broken-scatter-gather-transfer.patch

queue-3.6/arch-tile-avoid-generating-.eh_frame-information-in-modules.patch [new file with mode: 0644]
queue-3.6/ext4-avoid-underflow-in-ext4_trim_fs.patch [new file with mode: 0644]
queue-3.6/ext4-checksum-the-block-bitmap-properly-with-bigalloc-enabled.patch [new file with mode: 0644]
queue-3.6/hwmon-coretemp-add-support-for-atom-ce4110-4150-4170.patch [new file with mode: 0644]
queue-3.6/nohz-fix-idle-ticks-in-cpu-summary-line-of-proc-stat.patch [new file with mode: 0644]
queue-3.6/series
queue-3.6/usbdevfs-fix-broken-scatter-gather-transfer.patch [new file with mode: 0644]

diff --git a/queue-3.6/arch-tile-avoid-generating-.eh_frame-information-in-modules.patch b/queue-3.6/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.6/ext4-avoid-underflow-in-ext4_trim_fs.patch b/queue-3.6/ext4-avoid-underflow-in-ext4_trim_fs.patch
new file mode 100644 (file)
index 0000000..b2ba793
--- /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
+@@ -4987,8 +4987,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.6/ext4-checksum-the-block-bitmap-properly-with-bigalloc-enabled.patch b/queue-3.6/ext4-checksum-the-block-bitmap-properly-with-bigalloc-enabled.patch
new file mode 100644 (file)
index 0000000..21c4372
--- /dev/null
@@ -0,0 +1,163 @@
+From 79f1ba49569e5aec919b653c55b03274c2331701 Mon Sep 17 00:00:00 2001
+From: Tao Ma <boyu.mt@taobao.com>
+Date: Mon, 22 Oct 2012 00:34:32 -0400
+Subject: ext4: Checksum the block bitmap properly with bigalloc enabled
+
+From: Tao Ma <boyu.mt@taobao.com>
+
+commit 79f1ba49569e5aec919b653c55b03274c2331701 upstream.
+
+In mke2fs, we only checksum the whole bitmap block and it is right.
+While in the kernel, we use EXT4_BLOCKS_PER_GROUP to indicate the
+size of the checksumed bitmap which is wrong when we enable bigalloc.
+The right size should be EXT4_CLUSTERS_PER_GROUP and this patch fixes
+it.
+
+Also as every caller of ext4_block_bitmap_csum_set and
+ext4_block_bitmap_csum_verify pass in EXT4_BLOCKS_PER_GROUP(sb)/8,
+we'd better removes this parameter and sets it in the function itself.
+
+Signed-off-by: Tao Ma <boyu.mt@taobao.com>
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+Reviewed-by: Lukas Czerner <lczerner@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ext4/balloc.c  |    8 +++-----
+ fs/ext4/bitmap.c  |    6 ++++--
+ fs/ext4/ext4.h    |    4 ++--
+ fs/ext4/ialloc.c  |    4 +---
+ fs/ext4/mballoc.c |    9 +++------
+ fs/ext4/resize.c  |    3 +--
+ 6 files changed, 14 insertions(+), 20 deletions(-)
+
+--- a/fs/ext4/balloc.c
++++ b/fs/ext4/balloc.c
+@@ -174,8 +174,7 @@ void ext4_init_block_bitmap(struct super
+               ext4_free_inodes_set(sb, gdp, 0);
+               ext4_itable_unused_set(sb, gdp, 0);
+               memset(bh->b_data, 0xff, sb->s_blocksize);
+-              ext4_block_bitmap_csum_set(sb, block_group, gdp, bh,
+-                                         EXT4_BLOCKS_PER_GROUP(sb) / 8);
++              ext4_block_bitmap_csum_set(sb, block_group, gdp, bh);
+               return;
+       }
+       memset(bh->b_data, 0, sb->s_blocksize);
+@@ -212,8 +211,7 @@ void ext4_init_block_bitmap(struct super
+        */
+       ext4_mark_bitmap_end(num_clusters_in_group(sb, block_group),
+                            sb->s_blocksize * 8, bh->b_data);
+-      ext4_block_bitmap_csum_set(sb, block_group, gdp, bh,
+-                                 EXT4_BLOCKS_PER_GROUP(sb) / 8);
++      ext4_block_bitmap_csum_set(sb, block_group, gdp, bh);
+       ext4_group_desc_csum_set(sb, block_group, gdp);
+ }
+@@ -350,7 +348,7 @@ void ext4_validate_block_bitmap(struct s
+               return;
+       }
+       if (unlikely(!ext4_block_bitmap_csum_verify(sb, block_group,
+-                      desc, bh, EXT4_BLOCKS_PER_GROUP(sb) / 8))) {
++                      desc, bh))) {
+               ext4_unlock_group(sb, block_group);
+               ext4_error(sb, "bg %u: bad block bitmap checksum", block_group);
+               return;
+--- a/fs/ext4/bitmap.c
++++ b/fs/ext4/bitmap.c
+@@ -58,11 +58,12 @@ void ext4_inode_bitmap_csum_set(struct s
+ int ext4_block_bitmap_csum_verify(struct super_block *sb, ext4_group_t group,
+                                 struct ext4_group_desc *gdp,
+-                                struct buffer_head *bh, int sz)
++                                struct buffer_head *bh)
+ {
+       __u32 hi;
+       __u32 provided, calculated;
+       struct ext4_sb_info *sbi = EXT4_SB(sb);
++      int sz = EXT4_CLUSTERS_PER_GROUP(sb) / 8;
+       if (!EXT4_HAS_RO_COMPAT_FEATURE(sb,
+                                       EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))
+@@ -84,8 +85,9 @@ int ext4_block_bitmap_csum_verify(struct
+ void ext4_block_bitmap_csum_set(struct super_block *sb, ext4_group_t group,
+                               struct ext4_group_desc *gdp,
+-                              struct buffer_head *bh, int sz)
++                              struct buffer_head *bh)
+ {
++      int sz = EXT4_CLUSTERS_PER_GROUP(sb) / 8;
+       __u32 csum;
+       struct ext4_sb_info *sbi = EXT4_SB(sb);
+--- a/fs/ext4/ext4.h
++++ b/fs/ext4/ext4.h
+@@ -1867,10 +1867,10 @@ int ext4_inode_bitmap_csum_verify(struct
+                                 struct buffer_head *bh, int sz);
+ void ext4_block_bitmap_csum_set(struct super_block *sb, ext4_group_t group,
+                               struct ext4_group_desc *gdp,
+-                              struct buffer_head *bh, int sz);
++                              struct buffer_head *bh);
+ int ext4_block_bitmap_csum_verify(struct super_block *sb, ext4_group_t group,
+                                 struct ext4_group_desc *gdp,
+-                                struct buffer_head *bh, int sz);
++                                struct buffer_head *bh);
+ /* balloc.c */
+ extern void ext4_validate_block_bitmap(struct super_block *sb,
+--- a/fs/ext4/ialloc.c
++++ b/fs/ext4/ialloc.c
+@@ -753,9 +753,7 @@ got:
+                       ext4_free_group_clusters_set(sb, gdp,
+                               ext4_free_clusters_after_init(sb, group, gdp));
+                       ext4_block_bitmap_csum_set(sb, group, gdp,
+-                                                 block_bitmap_bh,
+-                                                 EXT4_BLOCKS_PER_GROUP(sb) /
+-                                                 8);
++                                                 block_bitmap_bh);
+                       ext4_group_desc_csum_set(sb, group, gdp);
+               }
+               ext4_unlock_group(sb, group);
+--- a/fs/ext4/mballoc.c
++++ b/fs/ext4/mballoc.c
+@@ -2804,8 +2804,7 @@ ext4_mb_mark_diskspace_used(struct ext4_
+       }
+       len = ext4_free_group_clusters(sb, gdp) - ac->ac_b_ex.fe_len;
+       ext4_free_group_clusters_set(sb, gdp, len);
+-      ext4_block_bitmap_csum_set(sb, ac->ac_b_ex.fe_group, gdp, bitmap_bh,
+-                                 EXT4_BLOCKS_PER_GROUP(sb) / 8);
++      ext4_block_bitmap_csum_set(sb, ac->ac_b_ex.fe_group, gdp, bitmap_bh);
+       ext4_group_desc_csum_set(sb, ac->ac_b_ex.fe_group, gdp);
+       ext4_unlock_group(sb, ac->ac_b_ex.fe_group);
+@@ -4664,8 +4663,7 @@ do_more:
+       ret = ext4_free_group_clusters(sb, gdp) + count_clusters;
+       ext4_free_group_clusters_set(sb, gdp, ret);
+-      ext4_block_bitmap_csum_set(sb, block_group, gdp, bitmap_bh,
+-                                 EXT4_BLOCKS_PER_GROUP(sb) / 8);
++      ext4_block_bitmap_csum_set(sb, block_group, gdp, bitmap_bh);
+       ext4_group_desc_csum_set(sb, block_group, gdp);
+       ext4_unlock_group(sb, block_group);
+       percpu_counter_add(&sbi->s_freeclusters_counter, count_clusters);
+@@ -4809,8 +4807,7 @@ int ext4_group_add_blocks(handle_t *hand
+       mb_free_blocks(NULL, &e4b, bit, count);
+       blk_free_count = blocks_freed + ext4_free_group_clusters(sb, desc);
+       ext4_free_group_clusters_set(sb, desc, blk_free_count);
+-      ext4_block_bitmap_csum_set(sb, block_group, desc, bitmap_bh,
+-                                 EXT4_BLOCKS_PER_GROUP(sb) / 8);
++      ext4_block_bitmap_csum_set(sb, block_group, desc, bitmap_bh);
+       ext4_group_desc_csum_set(sb, block_group, desc);
+       ext4_unlock_group(sb, block_group);
+       percpu_counter_add(&sbi->s_freeclusters_counter,
+--- a/fs/ext4/resize.c
++++ b/fs/ext4/resize.c
+@@ -1121,8 +1121,7 @@ static int ext4_set_bitmap_checksums(str
+       bh = ext4_get_bitmap(sb, group_data->block_bitmap);
+       if (!bh)
+               return -EIO;
+-      ext4_block_bitmap_csum_set(sb, group, gdp, bh,
+-                                 EXT4_BLOCKS_PER_GROUP(sb) / 8);
++      ext4_block_bitmap_csum_set(sb, group, gdp, bh);
+       brelse(bh);
+       return 0;
diff --git a/queue-3.6/hwmon-coretemp-add-support-for-atom-ce4110-4150-4170.patch b/queue-3.6/hwmon-coretemp-add-support-for-atom-ce4110-4150-4170.patch
new file mode 100644 (file)
index 0000000..eb8d702
--- /dev/null
@@ -0,0 +1,52 @@
+From 1102dcab849313bd5a340b299b5cf61b518fbc0f Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Tue, 9 Oct 2012 13:23:57 -0700
+Subject: hwmon: (coretemp) Add support for Atom CE4110/4150/4170
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit 1102dcab849313bd5a340b299b5cf61b518fbc0f upstream.
+
+TjMax for the CE4100 series of Atom CPUs was previously reported to be
+110 degrees C.
+
+cpuinfo logs on the web show existing CPU types CE4110, CE4150, and CE4170,
+reported as "model name : Intel(R) Atom(TM) CPU CE41{1|5|7}0 @ 1.{2|6}0GHz"
+with model 28 (0x1c) and stepping 10 (0x0a). Add the three known variants
+to the tjmax table.
+
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Documentation/hwmon/coretemp |    1 +
+ drivers/hwmon/coretemp.c     |    7 +++++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+--- a/Documentation/hwmon/coretemp
++++ b/Documentation/hwmon/coretemp
+@@ -105,6 +105,7 @@ Process            Processor                                       TjMax(C)
+               330/230                                         125
+               E680/660/640/620                                90
+               E680T/660T/640T/620T                            110
++              CE4170/4150/4110                                110
+ 45nm          Core2 Processors
+               Solo ULV SU3500/3300                            100
+--- a/drivers/hwmon/coretemp.c
++++ b/drivers/hwmon/coretemp.c
+@@ -205,8 +205,11 @@ static const struct tjmax __cpuinitconst
+       { "CPU N455", 100000 },
+       { "CPU N470", 100000 },
+       { "CPU N475", 100000 },
+-      { "CPU  230", 100000 },
+-      { "CPU  330", 125000 },
++      { "CPU  230", 100000 },         /* Model 0x1c, stepping 2       */
++      { "CPU  330", 125000 },         /* Model 0x1c, stepping 2       */
++      { "CPU CE4110", 110000 },       /* Model 0x1c, stepping 10      */
++      { "CPU CE4150", 110000 },       /* Model 0x1c, stepping 10      */
++      { "CPU CE4170", 110000 },       /* Model 0x1c, stepping 10      */
+ };
+ static int __cpuinit adjust_tjmax(struct cpuinfo_x86 *c, u32 id,
diff --git a/queue-3.6/nohz-fix-idle-ticks-in-cpu-summary-line-of-proc-stat.patch b/queue-3.6/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..19be31e30e1caeebbdf6820238ad1bfe1a326916 100644 (file)
@@ -1 +1,7 @@
 ext4-race-condition-protection-for-ext4_convert_unwritten_extents_endio.patch
+ext4-checksum-the-block-bitmap-properly-with-bigalloc-enabled.patch
+ext4-avoid-underflow-in-ext4_trim_fs.patch
+usbdevfs-fix-broken-scatter-gather-transfer.patch
+hwmon-coretemp-add-support-for-atom-ce4110-4150-4170.patch
+nohz-fix-idle-ticks-in-cpu-summary-line-of-proc-stat.patch
+arch-tile-avoid-generating-.eh_frame-information-in-modules.patch
diff --git a/queue-3.6/usbdevfs-fix-broken-scatter-gather-transfer.patch b/queue-3.6/usbdevfs-fix-broken-scatter-gather-transfer.patch
new file mode 100644 (file)
index 0000000..61002b8
--- /dev/null
@@ -0,0 +1,32 @@
+From 014639003c77a51fc319c9fdf225e7747cb6e18d Mon Sep 17 00:00:00 2001
+From: Henrik Rydberg <rydberg@euromail.se>
+Date: Sat, 13 Oct 2012 12:20:36 +0200
+Subject: usbdevfs: Fix broken scatter-gather transfer
+
+From: Henrik Rydberg <rydberg@euromail.se>
+
+commit 014639003c77a51fc319c9fdf225e7747cb6e18d upstream.
+
+The handling of large output bulk transfers is broken; the same user
+page is read over and over again. Fixed with this patch.
+
+Acked-by: Peter Stuge <peter@stuge.se>
+Acked-by: Hans de Goede <hdegoede@redhat.com>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/devio.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/core/devio.c
++++ b/drivers/usb/core/devio.c
+@@ -1348,6 +1348,7 @@ static int proc_do_submiturb(struct dev_
+                                       ret = -EFAULT;
+                                       goto error;
+                               }
++                              uurb->buffer += u;
+                       }
+                       totlen -= u;
+               }