From: Greg Kroah-Hartman Date: Mon, 9 Dec 2013 18:57:04 +0000 (-0800) Subject: 3.12-stable patches X-Git-Tag: v3.4.74~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=15253d26ddb983e532d707a2398fb2aa3048524d;p=thirdparty%2Fkernel%2Fstable-queue.git 3.12-stable patches added patches: n_tty-fix-missing-newline-echo.patch --- diff --git a/queue-3.12/n_tty-fix-missing-newline-echo.patch b/queue-3.12/n_tty-fix-missing-newline-echo.patch new file mode 100644 index 00000000000..d4ec8f07a52 --- /dev/null +++ b/queue-3.12/n_tty-fix-missing-newline-echo.patch @@ -0,0 +1,44 @@ +From 39434abd942c8e4b9c14c06a03b3245beaf8467f Mon Sep 17 00:00:00 2001 +From: Peter Hurley +Date: Fri, 29 Nov 2013 12:56:10 -0500 +Subject: n_tty: Fix missing newline echo + +From: Peter Hurley + +commit 39434abd942c8e4b9c14c06a03b3245beaf8467f upstream. + +When L_ECHONL is on, newlines are echoed regardless of the L_ECHO +state; if set, ensure accumulated echoes are flushed before finishing +the current input processing and before more output. + +Reported-by: Jason Gunthorpe +Signed-off-by: Peter Hurley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/n_tty.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/tty/n_tty.c ++++ b/drivers/tty/n_tty.c +@@ -810,7 +810,8 @@ static void process_echoes(struct tty_st + struct n_tty_data *ldata = tty->disc_data; + size_t echoed; + +- if (!L_ECHO(tty) || ldata->echo_commit == ldata->echo_tail) ++ if ((!L_ECHO(tty) && !L_ECHONL(tty)) || ++ ldata->echo_commit == ldata->echo_tail) + return; + + mutex_lock(&ldata->output_lock); +@@ -825,7 +826,8 @@ static void flush_echoes(struct tty_stru + { + struct n_tty_data *ldata = tty->disc_data; + +- if (!L_ECHO(tty) || ldata->echo_commit == ldata->echo_head) ++ if ((!L_ECHO(tty) && !L_ECHONL(tty)) || ++ ldata->echo_commit == ldata->echo_head) + return; + + mutex_lock(&ldata->output_lock); diff --git a/queue-3.12/series b/queue-3.12/series index 445cf0543cd..867a77512b5 100644 --- a/queue-3.12/series +++ b/queue-3.12/series @@ -53,3 +53,4 @@ input-allow-deselecting-serio-drivers-even-without-config_expert.patch input-mousedev-allow-disabling-even-without-config_expert.patch mei-me-add-lynx-point-wellsburg-work-station-device-id.patch mei-add-9-series-pch-mei-device-ids.patch +n_tty-fix-missing-newline-echo.patch