From: Paul Fulghum <paulkf@microgate.com>
To: Jurjen Oskam <jurjen@stupendous.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] 2.6.6 tty_io.c hangup locking
Date: 28 May 2004 15:33:10 -0500 [thread overview]
Message-ID: <1085776389.2106.36.camel@deimos.microgate.com> (raw)
In-Reply-To: <20040528201139.GA12281@quadpro.stupendous.org>
On Fri, 2004-05-28 at 15:11, Jurjen Oskam wrote:
> It was not only a warning here, but the pptp client also didn't work again
> until after rebooting. Every time the connection was retried (every 10
> seconds or so) the message appeared. Perhaps this is a problem in the pptp
> client, but after rebooting it worked.
That sounds like a different problem.
The warning itself is harmless.
I see another patch (not from me) related to closing a tty device
(also in tty_io.c) that has gone into 2.6.7-rc1
that may be related. I include that patch below
> As for the patch: applied to vanilla 2.6.5 (applied cleanly, offset -5
> lines) and compiling now.
>
> One problem though: I'm running 2.6 for about two weeks now (with a 24x7
> pptp connection), and I encountered this problem just once. I've seen a
> report that someone got this error when his connection was severed, so
> I'll try to pull the phone cable a few times and see how it recovers, both
> with and without your patch. I'll report back when I know more.
In order to see the warning, the synctty line discipline must
be waiting to push more send data to the tty device when disconnecting.
If the line is idle, then the warning will not appear on hangup.
You can try and provoke the warning in the unpatched kernel
by causing a hangup while sending lots of data.
--
Paul Fulghum
paulkf@microgate.com
diff -Nru a/drivers/char/tty_io.c b/drivers/char/tty_io.c
--- a/drivers/char/tty_io.c Sat May 22 22:55:13 2004
+++ b/drivers/char/tty_io.c Sat May 22 22:55:13 2004
@@ -1267,6 +1267,18 @@
#endif
/*
+ * Prevent flush_to_ldisc() from rescheduling the work for later. Then
+ * kill any delayed work.
+ */
+ clear_bit(TTY_DONT_FLIP, &tty->flags);
+ cancel_delayed_work(&tty->flip.work);
+
+ /*
+ * Wait for ->hangup_work and ->flip.work handlers to terminate
+ */
+ flush_scheduled_work();
+
+ /*
* Shutdown the current line discipline, and reset it to N_TTY.
* N.B. why reset ldisc when we're releasing the memory??
*/
@@ -1282,18 +1294,6 @@
module_put(o_tty->ldisc.owner);
o_tty->ldisc = ldiscs[N_TTY];
}
-
- /*
- * Prevent flush_to_ldisc() from rescheduling the work for later. Then
- * kill any delayed work.
- */
- clear_bit(TTY_DONT_FLIP, &tty->flags);
- cancel_delayed_work(&tty->flip.work);
-
- /*
- * Wait for ->hangup_work and ->flip.work handlers to terminate
- */
- flush_scheduled_work();
/*
* The release_mem function takes care of the details of clearing
next prev parent reply other threads:[~2004-05-28 20:33 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-27 17:45 Badness in local_bh_enable at kernel/softirq.c:122 Jurjen Oskam
2004-05-27 18:19 ` Jurjen Oskam
2004-05-27 20:41 ` Paul Fulghum
2004-05-28 18:42 ` [PATCH][RFC] 2.6.6 tty_io.c hangup locking Paul Fulghum
2004-05-28 20:11 ` Jurjen Oskam
2004-05-28 20:33 ` Paul Fulghum [this message]
2004-05-28 23:06 ` Andrew Morton
2004-05-29 17:45 ` Paul Fulghum
2004-06-01 20:51 ` [PATCH] 2.6.6 synclinkmp.c Paul Fulghum
2004-06-01 20:57 ` Russell King
2004-06-01 21:25 ` Paul Fulghum
2004-06-02 21:22 ` Russell King
2004-06-02 22:04 ` Paul Fulghum
2004-06-02 14:13 ` Paul Fulghum
2004-06-01 20:51 ` [PATCH] 2.6.6 synclink.c Paul Fulghum
2004-06-02 14:15 ` Paul Fulghum
2004-06-01 20:53 ` [PATCH] 2.6.6 synclink_cs.c Paul Fulghum
2004-06-01 21:00 ` Russell King
2004-06-01 23:04 ` Paul Fulghum
2004-06-13 9:05 ` [PATCH][RFC] 2.6.6 tty_io.c hangup locking Jurjen Oskam
2004-06-13 13:29 ` Paul Fulghum
2004-06-13 14:24 ` Jurjen Oskam
2004-06-13 14:39 ` Paul Fulghum
-- strict thread matches above, loose matches on Subject: below --
2004-06-13 15:05 Paul Fulghum
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=1085776389.2106.36.camel@deimos.microgate.com \
--to=paulkf@microgate.com \
--cc=jurjen@stupendous.org \
--cc=linux-kernel@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