From: Chuck Ebbert <76306.1226@compuserve.com>
To: Paul Fulghum <paulkf@microgate.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: 2.6.16.18 kernel freezes while pppd is exiting
Date: Mon, 12 Jun 2006 12:36:11 -0400 [thread overview]
Message-ID: <200606121239_MC3-1-C23E-9AF9@compuserve.com> (raw)
In-Reply-To: <1150124830.3703.6.camel@amdx2.microgate.com>
On Mon, 12 Jun 2006 10:07:10 -0500, Paul Fulghum wrote:
> Here is a patch to serialize flush_to_ldisc
> with per device granularity. It should fix the
> corruption of the free list that is the probably
> cause of the freeze you are seeing. Test it to
> see if there are any ill effects (it works fine here
> on an AMD x2 SMP kernel). I realize that
> the problem happens infrequently, so you won't
> be able to tell quickly if it fixed the freeze.
I already applied this, which should keep it from freezing and
will print a warning, so I will apply your patch and then check
the log every time pppd exits.
Check for infinite loops in tty_buffer_free_all(). Hangs have only
been seen in the second loop, but check both anyway.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
--- 2.6.16.20-d4.orig/drivers/char/tty_io.c
+++ 2.6.16.20-d4/drivers/char/tty_io.c
@@ -240,11 +240,23 @@ static int check_tty_count(struct tty_st
static void tty_buffer_free_all(struct tty_struct *tty)
{
struct tty_buffer *thead;
+ int free_loops;
+
+ free_loops = 0;
while((thead = tty->buf.head) != NULL) {
+ if (++free_loops > 9999) {
+ WARN_ON(1);
+ break;
+ }
tty->buf.head = thead->next;
kfree(thead);
}
+ free_loops = 0;
while((thead = tty->buf.free) != NULL) {
+ if (++free_loops > 9999) {
+ WARN_ON(1);
+ break;
+ }
tty->buf.free = thead->next;
kfree(thead);
}
--
Chuck
next reply other threads:[~2006-06-12 16:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-12 16:36 Chuck Ebbert [this message]
2006-06-12 18:06 ` Paul Fulghum
2006-06-12 18:11 ` Paul Fulghum
-- strict thread matches above, loose matches on Subject: below --
2006-06-08 23:07 Chuck Ebbert
2006-06-09 13:35 ` Paul Fulghum
2006-06-12 15:07 ` Paul Fulghum
2006-06-12 15:53 ` Alan Cox
2006-06-12 16:11 ` Paul Fulghum
2006-06-12 16:36 ` Alan Cox
2006-06-12 16:25 ` Paul Fulghum
2006-06-08 18:09 Chuck Ebbert
2006-06-08 20:08 ` Paul Fulghum
2006-06-08 21:17 ` 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=200606121239_MC3-1-C23E-9AF9@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=paulkf@microgate.com \
/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
all inboxes | Powered by JetHome®