summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2012-06-22 17:40:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-27 04:25:38 +0200
commit0a44ab41eb833d07e3ec807d87151c7164d4f075 (patch)
tree8073a65697742960db6bb61fecbc70bd06b15fb1 /drivers
parentMerge 3.5-rc4 into tty-next (diff)
downloadlinux-0a44ab41eb833d07e3ec807d87151c7164d4f075.tar.xz
linux-0a44ab41eb833d07e3ec807d87151c7164d4f075.zip
tty: note race we need to fix
This was identified by Vincent Pillet with a high speed interface that uses low latency mode. In the low latency case we have a tiny race but it can be hit. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/n_tty.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index ee1c268f5f9d..4f34491b65c6 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -1432,6 +1432,12 @@ static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
*/
if (tty->receive_room < TTY_THRESHOLD_THROTTLE)
tty_throttle(tty);
+
+ /* FIXME: there is a tiny race here if the receive room check runs
+ before the other work executes and empties the buffer (upping
+ the receiving room and unthrottling. We then throttle and get
+ stuck. This has been observed and traced down by Vincent Pillet/
+ We need to address this when we sort out out the rx path locking */
}
int is_ignored(int sig)