lkml.org 
[lkml]   [2000]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: 2.3.47 kernel panic with serial.o
From
   Date: Wed, 1 Mar 2000 16:20:41 -0500
From: Ian Peters <itp@gnu.org>

But now when I try to remove serial... rmmod never returns.

I found the problem; it's not actually a bug in the serial driver, but
in the rewrite of the bottom-half drivers to use tasklets.

When you remove the serial driver, it calls remove_bh(SERIAL_BH), which
calls tasklet_kill(). Tasklet_kill() uses a test_and_set
synchronization loop on the TASKLET_STATE_SCHED bit of t->state to make
sure that tasklet isn't being scheduled, and then waits for the tasklet
to finish running. The problem is that it doesn't clear the bit
afterwards!

This means that after calling remove_bh(), the TASKLET_STATE_SCHED bit
is stuck on, which permanently disables that particular bottom-half
handler from ever working properly. It also means that the next time
remove_bh() is called for that bottom-half handler, it will get stuck in
an (unkillable) infinite loop.

Linus, could you apply the following one-line patch to the 2.3 kernel
sources? Many thanks!

- Ted

Patch generated: on Sat Mar 4 14:40:08 EST 2000 by tytso@trampoline.thunk.org
against Linux version 2.3.49

===================================================================
RCS file: kernel/RCS/softirq.c,v
retrieving revision 1.1
diff -u -r1.1 kernel/softirq.c
--- kernel/softirq.c 2000/03/04 19:25:46 1.1
+++ kernel/softirq.c 2000/03/04 19:26:21
@@ -204,6 +204,7 @@
schedule();
}
tasklet_unlock_wait(t);
+ clear_bit(TASKLET_STATE_SCHED, &t->state);
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.048 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site