]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2013 21:06:35 +0000 (13:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2013 21:06:35 +0000 (13:06 -0800)
added patches:
alarmtimer-return-einval-instead-of-enotsupp-if-rtcdev-doesn-t-exist.patch
devpts-plug-the-memory-leak-in-kill_sb.patch
perf-tools-remove-cast-of-non-variadic-function-to-variadic.patch
pinctrl-dove-unset-twsi-option3-for-gconfig-as-well.patch

queue-3.10/alarmtimer-return-einval-instead-of-enotsupp-if-rtcdev-doesn-t-exist.patch [new file with mode: 0644]
queue-3.10/devpts-plug-the-memory-leak-in-kill_sb.patch [new file with mode: 0644]
queue-3.10/perf-tools-remove-cast-of-non-variadic-function-to-variadic.patch [new file with mode: 0644]
queue-3.10/pinctrl-dove-unset-twsi-option3-for-gconfig-as-well.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/alarmtimer-return-einval-instead-of-enotsupp-if-rtcdev-doesn-t-exist.patch b/queue-3.10/alarmtimer-return-einval-instead-of-enotsupp-if-rtcdev-doesn-t-exist.patch
new file mode 100644 (file)
index 0000000..389628e
--- /dev/null
@@ -0,0 +1,60 @@
+From 98d6f4dd84a134d942827584a3c5f67ffd8ec35f Mon Sep 17 00:00:00 2001
+From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+Date: Mon, 14 Oct 2013 17:33:16 -0400
+Subject: alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist
+
+From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+
+commit 98d6f4dd84a134d942827584a3c5f67ffd8ec35f upstream.
+
+Fedora Ruby maintainer reported latest Ruby doesn't work on Fedora Rawhide
+on ARM. (http://bugs.ruby-lang.org/issues/9008)
+
+Because of, commit 1c6b39ad3f (alarmtimers: Return -ENOTSUPP if no
+RTC device is present) intruduced to return ENOTSUPP when
+clock_get{time,res} can't find a RTC device. However this is incorrect.
+
+First, ENOTSUPP isn't exported to userland (ENOTSUP or EOPNOTSUP are the
+closest userland equivlents).
+
+Second, Posix and Linux man pages agree that clock_gettime and
+clock_getres should return EINVAL if clk_id argument is invalid.
+While the arugment that the clockid is valid, but just not supported
+on this hardware could be made, this is just a technicality that
+doesn't help userspace applicaitons, and only complicates error
+handling.
+
+Thus, this patch changes the code to use EINVAL.
+
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Frederic Weisbecker <fweisbec@gmail.com>
+Reported-by: Vit Ondruch <v.ondruch@tiscali.cz>
+Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+[jstultz: Tweaks to commit message to include full rational]
+Signed-off-by: John Stultz <john.stultz@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/time/alarmtimer.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/kernel/time/alarmtimer.c
++++ b/kernel/time/alarmtimer.c
+@@ -445,7 +445,7 @@ static int alarm_clock_getres(const cloc
+       clockid_t baseid = alarm_bases[clock2alarm(which_clock)].base_clockid;
+       if (!alarmtimer_get_rtcdev())
+-              return -ENOTSUPP;
++              return -EINVAL;
+       return hrtimer_get_res(baseid, tp);
+ }
+@@ -462,7 +462,7 @@ static int alarm_clock_get(clockid_t whi
+       struct alarm_base *base = &alarm_bases[clock2alarm(which_clock)];
+       if (!alarmtimer_get_rtcdev())
+-              return -ENOTSUPP;
++              return -EINVAL;
+       *tp = ktime_to_timespec(base->gettime());
+       return 0;
diff --git a/queue-3.10/devpts-plug-the-memory-leak-in-kill_sb.patch b/queue-3.10/devpts-plug-the-memory-leak-in-kill_sb.patch
new file mode 100644 (file)
index 0000000..b4114f5
--- /dev/null
@@ -0,0 +1,38 @@
+From 66da0e1f9034140ae2f571ef96e254a25083906c Mon Sep 17 00:00:00 2001
+From: Ilija Hadzic <ihadzic@research.bell-labs.com>
+Date: Tue, 12 Nov 2013 15:11:45 -0800
+Subject: devpts: plug the memory leak in kill_sb
+
+From: Ilija Hadzic <ihadzic@research.bell-labs.com>
+
+commit 66da0e1f9034140ae2f571ef96e254a25083906c upstream.
+
+When devpts is unmounted, there may be a no-longer-used IDR tree hanging
+off the superblock we are about to kill.  This needs to be cleaned up
+before destroying the SB.
+
+The leak is usually not a big deal because unmounting devpts is typically
+done when shutting down the whole machine.  However, shutting down an LXC
+container instead of a physical machine exposes the problem (the garbage
+is detectable with kmemleak).
+
+Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
+Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/devpts/inode.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/devpts/inode.c
++++ b/fs/devpts/inode.c
+@@ -498,6 +498,7 @@ static void devpts_kill_sb(struct super_
+ {
+       struct pts_fs_info *fsi = DEVPTS_SB(sb);
++      ida_destroy(&fsi->allocated_ptys);
+       kfree(fsi);
+       kill_litter_super(sb);
+ }
diff --git a/queue-3.10/perf-tools-remove-cast-of-non-variadic-function-to-variadic.patch b/queue-3.10/perf-tools-remove-cast-of-non-variadic-function-to-variadic.patch
new file mode 100644 (file)
index 0000000..e40bfa3
--- /dev/null
@@ -0,0 +1,75 @@
+From 53805eca3d89b095062c11a6798689bb0af09216 Mon Sep 17 00:00:00 2001
+From: Michael Hudson-Doyle <michael.hudson@linaro.org>
+Date: Thu, 31 Oct 2013 16:47:45 -0700
+Subject: perf tools: Remove cast of non-variadic function to variadic
+
+From: Michael Hudson-Doyle <michael.hudson@linaro.org>
+
+commit 53805eca3d89b095062c11a6798689bb0af09216 upstream.
+
+The 4fb71074a570 (perf ui/hist: Consolidate hpp helpers) cset introduced
+a cast of percent_color_snprintf to a function pointer type with
+varargs.  Change percent_color_snprintf to be variadic and remove the
+cast.
+
+The symptom of this was all percentages being reported as 0.00% in perf
+report --stdio output on the armhf arch.
+
+Signed-off-by: Michael Hudson-Doyle <michael.hudson@linaro.org>
+Acked-by: Namhyung Kim <namhyung@kernel.org>
+Acked-by: Will Deacon <will.deacon@arm.com>
+Cc: Jean Pihet <jean.pihet@linaro.org>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Cc: Will Deacon <will.deacon@arm.com>
+Link: http://lkml.kernel.org/r/87zjppvw7y.fsf@canonical.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/ui/hist.c    |    2 +-
+ tools/perf/util/color.c |   11 +++++++++--
+ tools/perf/util/color.h |    2 +-
+ 3 files changed, 11 insertions(+), 4 deletions(-)
+
+--- a/tools/perf/ui/hist.c
++++ b/tools/perf/ui/hist.c
+@@ -113,7 +113,7 @@ static u64 he_get_##_field(struct hist_e
+ static int hpp__color_##_type(struct perf_hpp *hpp, struct hist_entry *he)    \
+ {                                                                             \
+       return __hpp__fmt(hpp, he, he_get_##_field, " %6.2f%%",                 \
+-                        (hpp_snprint_fn)percent_color_snprintf, true);        \
++                        percent_color_snprintf, true);                        \
+ }
+ #define __HPP_ENTRY_PERCENT_FN(_type, _field)                                 \
+--- a/tools/perf/util/color.c
++++ b/tools/perf/util/color.c
+@@ -318,8 +318,15 @@ int percent_color_fprintf(FILE *fp, cons
+       return r;
+ }
+-int percent_color_snprintf(char *bf, size_t size, const char *fmt, double percent)
++int percent_color_snprintf(char *bf, size_t size, const char *fmt, ...)
+ {
+-      const char *color = get_percent_color(percent);
++      va_list args;
++      double percent;
++      const char *color;
++
++      va_start(args, fmt);
++      percent = va_arg(args, double);
++      va_end(args);
++      color = get_percent_color(percent);
+       return color_snprintf(bf, size, color, fmt, percent);
+ }
+--- a/tools/perf/util/color.h
++++ b/tools/perf/util/color.h
+@@ -39,7 +39,7 @@ int color_fprintf(FILE *fp, const char *
+ int color_snprintf(char *bf, size_t size, const char *color, const char *fmt, ...);
+ int color_fprintf_ln(FILE *fp, const char *color, const char *fmt, ...);
+ int color_fwrite_lines(FILE *fp, const char *color, size_t count, const char *buf);
+-int percent_color_snprintf(char *bf, size_t size, const char *fmt, double percent);
++int percent_color_snprintf(char *bf, size_t size, const char *fmt, ...);
+ int percent_color_fprintf(FILE *fp, const char *fmt, double percent);
+ const char *get_percent_color(double percent);
diff --git a/queue-3.10/pinctrl-dove-unset-twsi-option3-for-gconfig-as-well.patch b/queue-3.10/pinctrl-dove-unset-twsi-option3-for-gconfig-as-well.patch
new file mode 100644 (file)
index 0000000..8b33772
--- /dev/null
@@ -0,0 +1,31 @@
+From 6d0a4ed2b90a12e1403d3e7d9d8c2cc7fdc301b5 Mon Sep 17 00:00:00 2001
+From: Roel Kluin <roel.kluin@gmail.com>
+Date: Mon, 14 Oct 2013 01:27:27 +0200
+Subject: pinctrl: dove: unset twsi option3 for gconfig as well
+
+From: Roel Kluin <roel.kluin@gmail.com>
+
+commit 6d0a4ed2b90a12e1403d3e7d9d8c2cc7fdc301b5 upstream.
+
+This fixes a typo which left twsi config3 option enabled.
+
+Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
+Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/pinctrl/mvebu/pinctrl-dove.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/pinctrl/mvebu/pinctrl-dove.c
++++ b/drivers/pinctrl/mvebu/pinctrl-dove.c
+@@ -323,7 +323,7 @@ static int dove_twsi_ctrl_set(struct mve
+       unsigned long gcfg2 = readl(DOVE_GLOBAL_CONFIG_2);
+       gcfg1 &= ~DOVE_TWSI_ENABLE_OPTION1;
+-      gcfg2 &= ~(DOVE_TWSI_ENABLE_OPTION2 | DOVE_TWSI_ENABLE_OPTION2);
++      gcfg2 &= ~(DOVE_TWSI_ENABLE_OPTION2 | DOVE_TWSI_ENABLE_OPTION3);
+       switch (config) {
+       case 1:
index e82c56bf720999c3dc5d65f097d3bf887d1b0456..8700dedd492d9eba8cd95590473660285d38d559 100644 (file)
@@ -18,3 +18,7 @@ asoc-blackfin-fix-missing-break.patch
 asoc-fsl-imx-pcm-fiq-omit-fiq-counter-to-avoid-harm-in-unbalanced-situations.patch
 asoc-arizona-set-fll-to-free-run-before-disabling.patch
 asoc-wm5110-add-post-sysclk-register-patch-for-rev-d-chip.patch
+perf-tools-remove-cast-of-non-variadic-function-to-variadic.patch
+alarmtimer-return-einval-instead-of-enotsupp-if-rtcdev-doesn-t-exist.patch
+pinctrl-dove-unset-twsi-option3-for-gconfig-as-well.patch
+devpts-plug-the-memory-leak-in-kill_sb.patch