lkml.org 
[lkml]   [2006]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.16.18 kernel freezes while pppd is exiting
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-06-12 18:45    [W:0.032 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site