lkml.org 
[lkml]   [2001]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] small SCSI use count fix
Attached is a small fix to increment the use count in scsi_register_host()
before we start working with it - prevent false decrementing. (from one of
the crew here ;)

Please let me know if there is any reason this shouldn't go mainline in the
next 2.4.x.

thanks
Tim
--
Tim Hockin
Systems Software Engineer
Sun Microsystems, Cobalt Server Appliances
thockin@sun.comdiff -ruN dist+patches-2.4.8/drivers/scsi/scsi.c cobalt-2.4.8/drivers/scsi/scsi.c
--- dist+patches-2.4.8/drivers/scsi/scsi.c Thu Jul 19 21:07:04 2001
+++ cobalt-2.4.8/drivers/scsi/scsi.c Mon Aug 13 16:42:24 2001
@@ -1835,6 +1828,8 @@

pcount = next_scsi_host;

+ MOD_INC_USE_COUNT;
+
/* The detect routine must carefully spinunlock/spinlock if
it enables interrupts, since all interrupt handlers do
spinlock as well.
@@ -1964,8 +1965,6 @@
(scsi_init_memory_start - scsi_memory_lower_value) / 1024,
(scsi_memory_upper_value - scsi_init_memory_start) / 1024);
#endif
-
- MOD_INC_USE_COUNT;

if (out_of_space) {
scsi_unregister_host(tpnt); /* easiest way to clean up?? */
\
 
 \ /
  Last update: 2005-03-22 12:57    [W:0.028 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site