Patch "n_tty: Ensure reader restarts worker for next reader" has been added to the 3.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    n_tty: Ensure reader restarts worker for next reader

to the 3.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     n_tty-ensure-reader-restarts-worker-for-next-reader.patch
and it can be found in the queue-3.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 42458f41d08f0873299e830464c1232a6839297d Mon Sep 17 00:00:00 2001
From: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Nov 2013 13:59:46 -0500
Subject: n_tty: Ensure reader restarts worker for next reader

From: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>

commit 42458f41d08f0873299e830464c1232a6839297d upstream.

A departing reader must restart a flush_to_ldisc() worker _before_
the next reader enters the read loop; this is to avoid the new reader
concluding no more i/o is available and prematurely exiting, when the
old reader simply hasn't re-started the worker yet.

Signed-off-by: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/tty/n_tty.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -2253,6 +2253,9 @@ static ssize_t n_tty_read(struct tty_str
 		if (time)
 			timeout = time;
 	}
+	n_tty_set_room(tty);
+	up_read(&tty->termios_rwsem);
+
 	mutex_unlock(&ldata->atomic_read_lock);
 	remove_wait_queue(&tty->read_wait, &wait);
 
@@ -2263,8 +2266,6 @@ static ssize_t n_tty_read(struct tty_str
 	if (b - buf)
 		retval = b - buf;
 
-	n_tty_set_room(tty);
-	up_read(&tty->termios_rwsem);
 	return retval;
 }
 


Patches currently in stable-queue which might be from peter@xxxxxxxxxxxxxxxxxx are

queue-3.12/n_tty-fix-4096-byte-canonical-reads.patch
queue-3.12/tty-incorrect-test-of-echo_buf-result-for-echo_op_start.patch
queue-3.12/n_tty-ensure-reader-restarts-worker-for-next-reader.patch
queue-3.12/tty-reset-hupped-state-on-open.patch
queue-3.12/n_tty-fix-echo-overrun-tail-computation.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]