summaryrefslogtreecommitdiff
path: root/kernels/linux-libre-rt/Fix-n_tty_write-crash-when-echoing-in-raw-mode.patch
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-05-20 05:54:23 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-05-20 05:54:23 -0300
commit217f57a74281668a1be81d99d6ac284e15ab3310 (patch)
treec2a369eaff769b8cdca05e4bf37c438962c3403e /kernels/linux-libre-rt/Fix-n_tty_write-crash-when-echoing-in-raw-mode.patch
parentd16dfa8344d37b27fcba665bfb3d06db29977e59 (diff)
linux-libre-rt-3.14.3_rt5-1: updating version
Diffstat (limited to 'kernels/linux-libre-rt/Fix-n_tty_write-crash-when-echoing-in-raw-mode.patch')
-rw-r--r--kernels/linux-libre-rt/Fix-n_tty_write-crash-when-echoing-in-raw-mode.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernels/linux-libre-rt/Fix-n_tty_write-crash-when-echoing-in-raw-mode.patch b/kernels/linux-libre-rt/Fix-n_tty_write-crash-when-echoing-in-raw-mode.patch
new file mode 100644
index 000000000..0aa95628a
--- /dev/null
+++ b/kernels/linux-libre-rt/Fix-n_tty_write-crash-when-echoing-in-raw-mode.patch
@@ -0,0 +1,17 @@
+diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
+index 41fe8a0..fe9d129 100644
+--- a/drivers/tty/n_tty.c
++++ b/drivers/tty/n_tty.c
+@@ -2353,8 +2353,12 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
+ if (tty->ops->flush_chars)
+ tty->ops->flush_chars(tty);
+ } else {
++ struct n_tty_data *ldata = tty->disc_data;
++
+ while (nr > 0) {
++ mutex_lock(&ldata->output_lock);
+ c = tty->ops->write(tty, b, nr);
++ mutex_unlock(&ldata->output_lock);
+ if (c < 0) {
+ retval = c;
+ goto break_out; \ No newline at end of file