linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: greg@kroah.com, linux-serial@vger.kernel.org
Subject: [PATCH 03/12] tty: Note n_tty race
Date: Wed, 27 Jun 2012 12:21:29 +0100	[thread overview]
Message-ID: <20120627112128.5678.68881.stgit@localhost.localdomain> (raw)
In-Reply-To: <20120627112102.5678.4141.stgit@localhost.localdomain>

From: Alan Cox <alan@linux.intel.com>

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>
---

 drivers/tty/n_tty.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index ee1c268..4f34491 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)


  parent reply	other threads:[~2012-06-27 11:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 11:21 [PATCH 01/12] f81232: correct stubbed termios handler Alan Cox
2012-06-27 11:21 ` [PATCH 02/12] usb: fix sillies in the metro USB driver Alan Cox
2012-06-27 11:21 ` Alan Cox [this message]
2012-06-27 11:21 ` [PATCH 04/12] gpio-sch: Fix leak of resource Alan Cox
2012-06-27 19:32   ` Greg KH
2012-06-27 11:21 ` [PATCH 05/12] usb, kobil: Sort out some bogus tty handling Alan Cox
2012-06-27 11:22 ` [PATCH 06/12] 8250: use the 8250 register interface not the legacy one Alan Cox
2012-06-27 22:39   ` Paul Gortmaker
2012-06-27 22:50     ` Alan Cox
2012-06-27 11:22 ` [PATCH 07/12] 8250: propogate the bugs field Alan Cox
2012-06-27 11:22 ` [PATCH 08/12] 8250: add support for ASIX devices with a FIFO bug Alan Cox
2012-06-27 11:22 ` [PATCH 10/12] tty: tidy up the RESET_TERMIOS case Alan Cox
2012-06-27 11:23 ` [PATCH 11/12] vt: fix the keyboard/led locking Alan Cox
2012-06-27 11:23 ` [PATCH 12/12] tty: Move the handling of the tty release logic Alan Cox
2012-06-27 19:35 ` [PATCH 01/12] f81232: correct stubbed termios handler Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120627112128.5678.68881.stgit@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).