From: sullivan <sullivan@austin.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] ide-scsi cleanup bug
Date: Wed, 17 Jul 2002 14:58:20 -0500 [thread overview]
Message-ID: <20020717145820.F1136@austin.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 575 bytes --]
The following patch is against lk 2.5.26. The prior implementation called
scsi_unregister(host) from idescsi_cleanup(), removing the Scsi_Host instance
from the scsi_hostlist. Later when scsi_unregister_host(&template) was called
from exit_idescsi_module() but since the Scsi_Host instance had already been
removed no matches for the template were found and the device instances
remained.
The patch moves the scsi_unregister_host(&template) to idescsi_cleanup().
Since scsi_unregister_host() invokes scsi_unregister() this part of the
cleanup also occurs normally.
[-- Attachment #2: linux-2.5.26-ide-scsi.patch --]
[-- Type: text/plain, Size: 740 bytes --]
diff -Naur linux-2.5.26/drivers/scsi/ide-scsi.c linux-2.5.26-patched/drivers/scsi/ide-scsi.c
--- linux-2.5.26/drivers/scsi/ide-scsi.c Tue Jul 16 18:49:24 2002
+++ linux-2.5.26-patched/drivers/scsi/ide-scsi.c Wed Jul 17 19:14:35 2002
@@ -491,14 +491,13 @@
MOD_DEC_USE_COUNT;
}
+static Scsi_Host_Template template;
static int idescsi_cleanup (struct ata_device *drive)
{
- struct Scsi_Host *host = drive->driver_data;
-
if (ide_unregister_subdriver (drive)) {
return 1;
}
- scsi_unregister(host);
+ scsi_unregister_host(&template);
return 0;
}
@@ -801,7 +800,6 @@
static void __exit exit_idescsi_module(void)
{
unregister_ata_driver(&ata_ops);
- scsi_unregister_host(&template);
}
module_init(init_idescsi_module);
reply other threads:[~2002-07-17 19:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020717145820.F1136@austin.ibm.com \
--to=sullivan@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox