]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Oct 2020 14:07:43 +0000 (16:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Oct 2020 14:07:43 +0000 (16:07 +0200)
added patches:
mtd-rawnand-sunxi-fix-the-probe-error-path.patch
perf-top-fix-stdio-interface-input-handling-with-glibc-2.28.patch

queue-4.9/mtd-rawnand-sunxi-fix-the-probe-error-path.patch [new file with mode: 0644]
queue-4.9/perf-top-fix-stdio-interface-input-handling-with-glibc-2.28.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/mtd-rawnand-sunxi-fix-the-probe-error-path.patch b/queue-4.9/mtd-rawnand-sunxi-fix-the-probe-error-path.patch
new file mode 100644 (file)
index 0000000..48d559a
--- /dev/null
@@ -0,0 +1,34 @@
+From 3d84515ffd8fb657e10fa5b1215e9f095fa7efca Mon Sep 17 00:00:00 2001
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+Date: Tue, 19 May 2020 15:00:26 +0200
+Subject: mtd: rawnand: sunxi: Fix the probe error path
+
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+
+commit 3d84515ffd8fb657e10fa5b1215e9f095fa7efca upstream.
+
+nand_release() is supposed be called after MTD device registration.
+Here, only nand_scan() happened, so use nand_cleanup() instead.
+
+Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support")
+Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/linux-mtd/20200519130035.1883-54-miquel.raynal@bootlin.com
+[iwamatsu: adjust filename]
+Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/mtd/nand/sunxi_nand.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mtd/nand/sunxi_nand.c
++++ b/drivers/mtd/nand/sunxi_nand.c
+@@ -2108,7 +2108,7 @@ static int sunxi_nand_chip_init(struct d
+       ret = mtd_device_register(mtd, NULL, 0);
+       if (ret) {
+               dev_err(dev, "failed to register mtd device: %d\n", ret);
+-              nand_release(nand);
++              nand_cleanup(nand);
+               return ret;
+       }
diff --git a/queue-4.9/perf-top-fix-stdio-interface-input-handling-with-glibc-2.28.patch b/queue-4.9/perf-top-fix-stdio-interface-input-handling-with-glibc-2.28.patch
new file mode 100644 (file)
index 0000000..95bf342
--- /dev/null
@@ -0,0 +1,53 @@
+From 29b4f5f188571c112713c35cc87eefb46efee612 Mon Sep 17 00:00:00 2001
+From: Tommi Rantala <tommi.t.rantala@nokia.com>
+Date: Thu, 5 Mar 2020 10:37:12 +0200
+Subject: perf top: Fix stdio interface input handling with glibc 2.28+
+
+From: Tommi Rantala <tommi.t.rantala@nokia.com>
+
+commit 29b4f5f188571c112713c35cc87eefb46efee612 upstream.
+
+Since glibc 2.28 when running 'perf top --stdio', input handling no
+longer works, but hitting any key always just prints the "Mapped keys"
+help text.
+
+To fix it, call clearerr() in the display_thread() loop to clear any EOF
+sticky errors, as instructed in the glibc NEWS file
+(https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS):
+
+ * All stdio functions now treat end-of-file as a sticky condition.  If you
+   read from a file until EOF, and then the file is enlarged by another
+   process, you must call clearerr or another function with the same effect
+   (e.g. fseek, rewind) before you can read the additional data.  This
+   corrects a longstanding C99 conformance bug.  It is most likely to affect
+   programs that use stdio to read interactive input from a terminal.
+   (Bug #1190.)
+
+Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
+Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Cc: Mark Rutland <mark.rutland@arm.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Link: http://lore.kernel.org/lkml/20200305083714.9381-2-tommi.t.rantala@nokia.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/perf/builtin-top.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/tools/perf/builtin-top.c
++++ b/tools/perf/builtin-top.c
+@@ -633,7 +633,9 @@ repeat:
+       delay_msecs = top->delay_secs * MSEC_PER_SEC;
+       set_term_quiet_input(&save);
+       /* trash return*/
+-      getc(stdin);
++      clearerr(stdin);
++      if (poll(&stdin_poll, 1, 0) > 0)
++              getc(stdin);
+       while (!done) {
+               perf_top__print_sym_table(top);
index e8d9eae1fc7aa9d6ea28bb0540826889967a7e32..0e2d26d71d2e940f6ae2acdb0b07f1fc96716a14 100644 (file)
@@ -29,3 +29,5 @@ usermodehelper-reset-umask-to-default-before-executing-user-process.patch
 platform-x86-thinkpad_acpi-initialize-tp_nvram_state-variable.patch
 platform-x86-thinkpad_acpi-re-initialize-acpi-buffer-size-when-reuse.patch
 driver-core-fix-probe_count-imbalance-in-really_probe.patch
+perf-top-fix-stdio-interface-input-handling-with-glibc-2.28.patch
+mtd-rawnand-sunxi-fix-the-probe-error-path.patch