From: Brian King <brking@us.ibm.com>
To: Mike Anderson <andmike@us.ibm.com>
Cc: pac@fortuitous.com, linux-scsi@vger.kernel.org,
James Bottomley <James.Bottomley@SteelEye.com>,
Kai.Makisara@kolumbus.fi, dgilbert@interlog.com
Subject: Re: System freeze when accessing st.ko and /dev/st0
Date: Fri, 06 Feb 2004 14:47:26 -0600 [thread overview]
Message-ID: <4023FD5E.8060604@us.ibm.com> (raw)
In-Reply-To: 20040206202903.GB1488@beaverton.ibm.com
[-- Attachment #1: Type: text/plain, Size: 755 bytes --]
Mike Anderson wrote:
> Brian King [brking@us.ibm.com] wrote:
>
>>I have been debugging this same problem in sg today. It appears as if
>>kobj_unmap is never getting called when a device is deleted. When I
>>added a call to kobj_unmap, the problem went away. I'm currently working
>>on a patch for this.
>>
>>-Brian
>
>
> Are you indicating that we need a direct call to kobj_unmap along with
> the call to cdev_unmap?
No. We just need a call to cdev_unmap, which isn't getting done. The attached
patch should fix this for both sg and st. I have tested both and it works for me.
Phil, can you please apply and let me know if it fixes your problem? It should
apply against 2.6.2.
Thanks
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
[-- Attachment #2: patch-2.6.2-sg_st-cdev_unmap --]
[-- Type: text/plain, Size: 1024 bytes --]
diff -Naur linux-2.6.2/drivers/scsi/sg.c linux-2.6.2-cdev_unmap/drivers/scsi/sg.c
--- linux-2.6.2/drivers/scsi/sg.c Fri Feb 6 14:12:22 2004
+++ linux-2.6.2-cdev_unmap/drivers/scsi/sg.c Fri Feb 6 14:12:35 2004
@@ -1513,6 +1513,7 @@
if (sdp) {
sysfs_remove_link(&scsidp->sdev_gendev.kobj, "generic");
sysfs_remove_link(&sdp->cdev->kobj, "device");
+ cdev_unmap(MKDEV(SCSI_GENERIC_MAJOR, sdp->disk->first_minor), 1);
cdev_del(sdp->cdev);
sdp->cdev = NULL;
devfs_remove("%s/generic", scsidp->devfs_name);
diff -Naur linux-2.6.2/drivers/scsi/st.c linux-2.6.2-cdev_unmap/drivers/scsi/st.c
--- linux-2.6.2/drivers/scsi/st.c Fri Jan 9 00:59:45 2004
+++ linux-2.6.2-cdev_unmap/drivers/scsi/st.c Fri Feb 6 14:18:57 2004
@@ -3964,6 +3964,7 @@
for (j=0; j < 2; j++) {
sysfs_remove_link(&tpnt->modes[mode].cdevs[j]->kobj,
"device");
+ cdev_unmap(MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(i, mode, j)), 1);
cdev_del(tpnt->modes[mode].cdevs[j]);
tpnt->modes[mode].cdevs[j] = NULL;
}
next prev parent reply other threads:[~2004-02-06 20:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-06 19:42 System freeze when accessing st.ko and /dev/st0 Phil Carinhas
2004-02-06 20:09 ` Brian King
2004-02-06 20:29 ` Mike Anderson
2004-02-06 20:47 ` Brian King [this message]
2004-02-06 20:54 ` Brian King
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=4023FD5E.8060604@us.ibm.com \
--to=brking@us.ibm.com \
--cc=James.Bottomley@SteelEye.com \
--cc=Kai.Makisara@kolumbus.fi \
--cc=andmike@us.ibm.com \
--cc=dgilbert@interlog.com \
--cc=linux-scsi@vger.kernel.org \
--cc=pac@fortuitous.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