From: Mark Bellon <mbellon@mvista.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] 2.4.28 - AIC driver causes kernel corruption (as a module)
Date: Tue, 11 Jan 2005 13:19:03 -0700 [thread overview]
Message-ID: <41E434B7.6050602@mvista.com> (raw)
In-Reply-To: <1105472884.10378.17.camel@mulgrave>
[-- Attachment #1: Type: text/plain, Size: 497 bytes --]
James Bottomley wrote:
>On Tue, 2005-01-11 at 12:24 -0700, Mark Bellon wrote:
>
>
>>- scsi_unregister_module(MODULE_SCSI_HA,
>>- &aic79xx_driver_template);
>>+ ahd_linux_exit();
>>
>>
>
>Well, this is pretty much identical to the 2.6 fix for the same problem
>except that you forgot to remove the __exit designation from ah
>[cd]_linux_exit(). This is required to prevent hanging pointer
>references.
>
>James
>
>
>
>
Ah! Very true, very true. Updated patch attached.
mark
[-- Attachment #2: scsi-patch --]
[-- Type: text/plain, Size: 1800 bytes --]
Index: drivers/scsi/aic7xxx/aic79xx_osm.c
===================================================================
RCS file: /cvsdev/mvl-kernel/linux/drivers/scsi/aic7xxx/aic79xx_osm.c,v
retrieving revision 1.2.4.2.12.4
diff -a -u -r1.2.4.2.12.4 aic79xx_osm.c
--- drivers/scsi/aic7xxx/aic79xx_osm.c 12 Feb 2004 15:33:49 -0000 1.2.4.2.12.4
+++ drivers/scsi/aic7xxx/aic79xx_osm.c 11 Jan 2005 19:53:02 -0000
@@ -5079,6 +5079,8 @@
}
}
+static void ahd_linux_exit(void);
+
static int __init
ahd_linux_init(void)
{
@@ -5087,8 +5089,7 @@
#else
scsi_register_module(MODULE_SCSI_HA, &aic79xx_driver_template);
if (aic79xx_driver_template.present == 0) {
- scsi_unregister_module(MODULE_SCSI_HA,
- &aic79xx_driver_template);
+ ahd_linux_exit();
return (-ENODEV);
}
@@ -5096,7 +5097,7 @@
#endif
}
-static void __exit
+static void
ahd_linux_exit(void)
{
struct ahd_softc *ahd;
Index: drivers/scsi/aic7xxx/aic7xxx_osm.c
===================================================================
RCS file: /cvsdev/mvl-kernel/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c,v
retrieving revision 1.2.4.2.12.3
diff -a -u -r1.2.4.2.12.3 aic7xxx_osm.c
--- drivers/scsi/aic7xxx/aic7xxx_osm.c 12 Feb 2004 15:33:49 -0000 1.2.4.2.12.3
+++ drivers/scsi/aic7xxx/aic7xxx_osm.c 11 Jan 2005 19:53:08 -0000
@@ -5077,6 +5077,8 @@
}
}
+static void ahc_linux_exit(void);
+
static int __init
ahc_linux_init(void)
{
@@ -5085,8 +5087,7 @@
#else
scsi_register_module(MODULE_SCSI_HA, &aic7xxx_driver_template);
if (aic7xxx_driver_template.present == 0) {
- scsi_unregister_module(MODULE_SCSI_HA,
- &aic7xxx_driver_template);
+ ahc_linux_exit();
return (-ENODEV);
}
@@ -5094,7 +5095,7 @@
#endif
}
-static void __exit
+static void
ahc_linux_exit(void)
{
struct ahc_softc *ahc;
prev parent reply other threads:[~2005-01-11 20:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-11 19:24 [PATCH] 2.4.28 - AIC driver causes kernel corruption (as a module) Mark Bellon
2005-01-11 19:48 ` James Bottomley
2005-01-11 20:19 ` Mark Bellon [this message]
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=41E434B7.6050602@mvista.com \
--to=mbellon@mvista.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.