[1991] in linux-scsi channel archive

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

Re: scsi.c module patch

daemon@ATHENA.MIT.EDU (Eric Youngdale)
Fri Jun 13 12:06:39 1997

Date: 	Thu, 12 Jun 1997 23:55:30 -0400 (EDT)
From: Eric Youngdale <eric@andante.jic.com>
To: Andrea Arcangeli <arcangeli@mbox.queen.it>
cc: "Leonard N. Zubkoff" <lnz@dandelion.com>, linux-scsi@vger.rutgers.edu
In-Reply-To: <Pine.LNX.3.96.970612104708.159A-100000@arca.queen.it>


On Thu, 12 Jun 1997, Andrea Arcangeli wrote:

> On Wed, 11 Jun 1997, Leonard N. Zubkoff wrote:
> 
> >  Date: 	Thu, 12 Jun 1997 00:53:52 +0200 (CEST)
> >  From: Andrea Arcangeli <arcangeli@mbox.queen.it>
> >  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. 
> >
> >Can you look into *why* the timer is still active?  There shouldn't be any
> >active commands for the SCSI module when it is being unloaded, and hence the
> >timer should already have been inactivated by update_timeout.  If it hasn't
> 
> Yes, but the problem cames when the SCSI_TIMER is programmed to run
> update_timeout after insmod ppa and then I run rmmod scsi_mod before
> update_timeout is run. rmmod set .fn = 0 and I get an Oops with
> EIP=00000000.
> 
> >been, then there's a deeper underlying problem and this patch is just masking
> >the incorrect behavior.
> 
> Please explain better.

	The problem is that there should never be the possibility of a
timeout unless there are commands that are running, and that if there are
commands that are running there should not be the possibility of unloading
the module.  Turning off the timer is merely a band-aid - the fact remains
that having an active timer implies that there is an active command.

	It is possible that there is a bug where the timer isn't canceled
for some reason, or there is a bug whereby we allow the driver to be
removed even though there are active commands.

	It would be nice to know what command is timing out for you, and
where it originated from.

-Eric




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