All of lore.kernel.org
 help / color / mirror / Atom feed
From: sullivan <sullivan@austin.ibm.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH] fix for sd removal loop
Date: Fri, 16 Aug 2002 12:52:56 -0500	[thread overview]
Message-ID: <20020816125256.E1216@austin.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

Attached is a trivial fix for an excessive loop that is encountered in
removal of the sd module. This case is hit when sd is insmod'ed and rmmod'ed
without any scsi devices being registered. In this case, within exit_sd(), 
sd_template.dev_max remains at zero and the N_USED_SD_MAJORS macro yields an 
incorrect result since it is treating dev_max as an signed number. 



[-- Attachment #2: linux-2.5-devclass-hosts.patch --]
[-- Type: text/plain, Size: 783 bytes --]

diff -Nau --exclude='p.*' linux-2.5-devclass/drivers/scsi/hosts.h linux-2.5-devclass-mike/drivers/scsi/hosts.h
--- linux-2.5-devclass/drivers/scsi/hosts.h	Fri Aug 16 19:42:09 2002
+++ linux-2.5-devclass-mike/drivers/scsi/hosts.h	Wed Aug 14 23:32:55 2002
@@ -519,7 +519,7 @@
     unsigned int max_major;      /* Maximum major in range. */
     unsigned int nr_dev;	  /* Number currently attached */
     unsigned int dev_noticed;	  /* Number of devices detected. */
-    unsigned int dev_max;	  /* Current size of arrays */
+    signed int dev_max;	  /* Current size of arrays */
     unsigned blk:1;		  /* 0 if character device */
     int (*detect)(Scsi_Device *); /* Returns 1 if we can attach this device */
     int (*init)(void);		  /* Sizes arrays based upon number of devices

             reply	other threads:[~2002-08-16 17:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-16 17:52 sullivan [this message]
2002-08-16 19:23 ` [PATCH] fix for sd removal loop Mike Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020816125256.E1216@austin.ibm.com \
    --to=sullivan@austin.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.