From: Patrick Mansfield <patmans@us.ibm.com>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>, linux-scsi@vger.kernel.org
Subject: [patch] Re: 2.5.42 kernel BUG at drivers/base/core.c:251!
Date: Tue, 15 Oct 2002 11:18:03 -0700 [thread overview]
Message-ID: <20021015111803.A27953@eng2.beaverton.ibm.com> (raw)
In-Reply-To: <200210151724.g9FHOI426577@eng2.beaverton.ibm.com>; from pbadari@us.ibm.com on Tue, Oct 15, 2002 at 10:24:18AM -0700
On Tue, Oct 15, 2002 at 10:24:18AM -0700, Badari Pulavarty wrote:
> Is this a known problem on 2.5.42 ? Happens all the time with rmmod.
>
> - Badari
I hit a similiar bug for the put_device(&shpnt->host_driverfs_dev) of the
Scsi_Host, here's a patch for the scsi changes, I can't fully test it
since my devices seen via insmod aren't showing up properly right now, but
rmmod works, and the scsi remove-single-device also works without BUG-ing
or doing other bad things by leaving a dev model reference around:
--- linux-2.5.42/drivers/scsi/st.c Fri Oct 11 21:22:11 2002
+++ linux-2.5.42-scsi-unreg/drivers/scsi/st.c Tue Oct 15 10:49:14 2002
@@ -3909,12 +3909,12 @@
&dev_attr_type);
device_remove_file(&tpnt->driverfs_dev_r[mode],
&dev_attr_kdev);
- put_device(&tpnt->driverfs_dev_r[mode]);
+ device_unregister(&tpnt->driverfs_dev_r[mode]);
device_remove_file(&tpnt->driverfs_dev_n[mode],
&dev_attr_type);
device_remove_file(&tpnt->driverfs_dev_n[mode],
&dev_attr_kdev);
- put_device(&tpnt->driverfs_dev_n[mode]);
+ device_unregister(&tpnt->driverfs_dev_n[mode]);
}
if (tpnt->buffer) {
tpnt->buffer->orig_frp_segs = 0;
--- linux-2.5.42/drivers/scsi/sg.c Fri Oct 11 21:22:07 2002
+++ linux-2.5.42-scsi-unreg/drivers/scsi/sg.c Tue Oct 15 10:49:29 2002
@@ -1611,7 +1611,7 @@
sdp->de = NULL;
device_remove_file(&sdp->sg_driverfs_dev, &dev_attr_type);
device_remove_file(&sdp->sg_driverfs_dev, &dev_attr_kdev);
- put_device(&sdp->sg_driverfs_dev);
+ device_unregister(&sdp->sg_driverfs_dev);
if (NULL == sdp->headfp)
vfree((char *) sdp);
}
--- linux-2.5.42/drivers/scsi/scsi.c Fri Oct 11 21:22:08 2002
+++ linux-2.5.42-scsi-unreg/drivers/scsi/scsi.c Tue Oct 15 10:49:51 2002
@@ -1965,6 +1965,7 @@
if (HBA_ptr->hostt->slave_detach)
(*HBA_ptr->hostt->slave_detach) (scd);
devfs_unregister (scd->de);
+ device_unregister(&scd->sdev_driverfs_dev);
scsi_release_commandblocks(scd);
/* Now we can remove the device structure */
@@ -2254,7 +2255,7 @@
if (shpnt->hostt->slave_detach)
(*shpnt->hostt->slave_detach) (SDpnt);
devfs_unregister (SDpnt->de);
- put_device(&SDpnt->sdev_driverfs_dev);
+ device_unregister(&SDpnt->sdev_driverfs_dev);
}
}
@@ -2305,7 +2306,7 @@
/* Remove the /proc/scsi directory entry */
sprintf(name,"%d",shpnt->host_no);
remove_proc_entry(name, tpnt->proc_dir);
- put_device(&shpnt->host_driverfs_dev);
+ device_unregister(&shpnt->host_driverfs_dev);
if (tpnt->release)
(*tpnt->release) (shpnt);
else {
next prev parent reply other threads:[~2002-10-15 18:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-15 17:24 Badari Pulavarty
2002-10-15 18:18 ` Patrick Mansfield [this message]
2002-10-18 0:12 ` Patrick Mochel
2002-10-18 0:26 ` 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=20021015111803.A27953@eng2.beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=pbadari@us.ibm.com \
/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
all inboxes | Powered by JetHome®