[1980] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

scsi.c module patch

daemon@ATHENA.MIT.EDU (Andrea Arcangeli)
Wed Jun 11 18:56:24 1997

Date: 	Thu, 12 Jun 1997 00:53:52 +0200 (CEST)
From: Andrea Arcangeli <arcangeli@mbox.queen.it>
To: linux-scsi@vger.rutgers.edu

I have fixed the bug that causes my kernel to crash doing the script:

#!/bin/sh
while :; do
modprobe ppa
modprobe -r ppa
done

The crash was caused from the execution of the scsi_main_timeout function
by the SCSI_TIMER when the module was just cleared from memory.

So I have stopped the SCSI_TIMER before clear the module from memory. 

--- /usr/src/linux/drivers/scsi/scsi.c	Wed Jun 11 19:19:36 1997
+++ linux/drivers/scsi/scsi.c	Wed Jun 11 19:19:00 1997
@@ -12,6 +12,7 @@
  *      Rik Faith <faith@cs.unc.edu>
  *      Tommy Thorn <tthorn>
  *      Thomas Wuensche <tw@fgb1.fgb.mw.tu-muenchen.de>
+ *      Andrea Arcangeli <arcangeli@mbox.queen.it>
  *
  *  Modified by Eric Youngdale eric@aib.com to
  *  add scatter-gather, multiple outstanding request, and other
@@ -3508,6 +3509,7 @@
 
 void cleanup_module( void)
 {
+    timer_active &= ~(1 << SCSI_TIMER);
 #if CONFIG_PROC_FS
     proc_scsi_unregister(0, PROC_SCSI_SCSI);
 

Bye!

Andrea Arcangeli
arcangeli@mbox.queen.it

HomePage:      http://www.imola.queen.it/user/arcangeli/
Debian Mirror: ftp://dida43.deis.unibo.it/pub/debian/

Debian GNU
   __   _                __
  / /  (_)__  __ ____ __/ /
 / /__/ / _ \/ // /\ \ /_/
/____/_/_//_/\_,_//_\_(_)





home help back first fref pref prev next nref lref last post