From: Willem Riede <wrlk@riede.org>
To: linux-scsi@vger.kernel.org
Subject: buggy scsi_register behaviour in 2.5.51
Date: Mon, 16 Dec 2002 19:50:30 -0500 [thread overview]
Message-ID: <20021217005030.GA7990@linnie.riede.org> (raw)
I was investigating why I get
Dec 14 14:50:55 fallguy kernel: Badness in kobject_register at lib/kobject.c:113
Dec 14 14:50:55 fallguy kernel: Call Trace:
Dec 14 14:50:55 fallguy kernel: [<c01c7c88>] kobject_register+0x58/0x70
Dec 14 14:50:55 fallguy kernel: [<c01db442>] bus_add_driver+0x82/0xd0
Dec 14 14:50:55 fallguy kernel: [<c022bd00>] ide_drive_remove+0x0/0x30
Dec 14 14:50:55 fallguy kernel: [<c022bdec>] ide_register_driver+0xbc/0xf0
Dec 14 14:50:55 fallguy kernel: [<c0133f6a>] sys_init_module+0x1ba/0x1d0
Dec 14 14:50:55 fallguy kernel: [<c010b643>] syscall_call+0x7/0xb
when re-insmod-ing ide-scsi, and the "badness" is in sysfs create_dir,
appearently because the ide-scsi directory is not removed when ide-scsi
is unloaded so the create fails because it already exists.
But that's not the only thing going wrong when repeatedly (un)loading.
See below for some really horrible effects:
[root@fallguy linux-2.5.51]# insmod drivers/scsi/ide-scsi.ko
[root@fallguy linux-2.5.51]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 03 Lun: 00
Vendor: OnStream Model: SC-30 Rev: 1.09
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 06 Lun: 00
Vendor: MATSHITA Model: CD-R CW-7502 Rev: 4.17
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: DNES-318350W Rev: SA30
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi1 Channel: 00 Id: 01 Lun: 00
Vendor: IBM Model: DGHS09U Rev: 0350
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: CONNER Model: CTT8000-A Rev: 2.08
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi3 Channel: 00 Id: 01 Lun: 00
Vendor: OnStream Model: DI-30 Rev: 1.09
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi3 Channel: 00 Id: 02 Lun: 00
Vendor: OnStream Model: ADR Series Rev: 5.05
Type: Sequential-Access ANSI SCSI revision: 02
[root@fallguy linux-2.5.51]# ls -l /sysfs/bus/ide/drivers/ide-scsi
total 0
[root@fallguy linux-2.5.51]# ls -ld /sysfs/bus/ide/drivers/ide-scsi
drwxr-xr-x 2 root root 0 Dec 15 15:54 /sysfs/bus/ide/drivers/ide-scsi
[root@fallguy linux-2.5.51]# rmmod ide_scsi
[root@fallguy linux-2.5.51]# ls -ld /sysfs/bus/ide/drivers/ide-scsi
drwxr-xr-x 2 root root 0 Dec 15 15:54 /sysfs/bus/ide/drivers/ide-scsi
^^ the directory is still there ! ^^
[root@fallguy linux-2.5.51]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 03 Lun: 00
Vendor: OnStream Model: SC-30 Rev: 1.09
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 06 Lun: 00
Vendor: MATSHITA Model: CD-R CW-7502 Rev: 4.17
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: DNES-318350W Rev: SA30
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi1 Channel: 00 Id: 01 Lun: 00
Vendor: IBM Model: DGHS09U Rev: 0350
Type: Direct-Access ANSI SCSI revision: 03
[root@fallguy linux-2.5.51]# insmod drivers/scsi/ide-scsi.ko
[root@fallguy linux-2.5.51]# ls -ld /sysfs/bus/ide/drivers/ide-scsi
drwxr-xr-x 2 root root 0 Dec 15 15:54 /sysfs/bus/ide/drivers/ide-scsi
[root@fallguy linux-2.5.51]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 03 Lun: 00
Vendor: OnStream Model: SC-30 Rev: 1.09
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 06 Lun: 00
Vendor: MATSHITA Model: CD-R CW-7502 Rev: 4.17
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: DNES-318350W Rev: SA30
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi1 Channel: 00 Id: 01 Lun: 00
Vendor: IBM Model: DGHS09U Rev: 0350
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: OnStream Model: ADR Series Rev: 5.05
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi3 Channel: 00 Id: 01 Lun: 00
Vendor: OnStream Model: DI-30 Rev: 1.09
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi3 Channel: 00 Id: 02 Lun: 00
Vendor: CONNER Model: CTT8000-A Rev: 2.08
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi4 Channel: 00 Id: 00 Lun: 00
Vendor: OnStream Model: ADR Series Rev: 5.05
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi4 Channel: 00 Id: 01 Lun: 00
Vendor: OnStream Model: DI-30 Rev: 1.09
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi4 Channel: 00 Id: 02 Lun: 00
Vendor: CONNER Model: CTT8000-A Rev: 2.08
Type: Sequential-Access ANSI SCSI revision: 02
ide-scsi has now been assigned both scsi3 and scsi4?? Its devices appear twice!
Clearly not correct. I'll work on fixing this, but first I have a question.
Reading the source (hosts.c), it appears that a host adapter will only get
the same number as it had before, if it has been specified in the module
parameter "scsihosts".
Is it a concious design decision to not try and re-assign the same number as
before if an adapter not in "scsihosts" gets (un)loaded repeatedly?
I think a fix for this would be different if I would try to reassign the
same number than if the intention is to keep assigning new numbers.
Thanks for your advise. Willem Riede.
next reply other threads:[~2002-12-17 0:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-17 0:50 Willem Riede [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-12-17 3:27 buggy scsi_register behaviour in 2.5.51 Douglas Gilbert
2002-12-17 11:47 ` Willem Riede
2002-12-18 12:14 ` Douglas Gilbert
2002-12-18 23:20 ` Willem Riede
2002-12-20 14:46 ` Willem Riede
2002-12-18 1:52 ` Willem Riede
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=20021217005030.GA7990@linnie.riede.org \
--to=wrlk@riede.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 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.