From: Mikael Pettersson <mikpe@csd.uu.se>
To: alan@lxorguk.ukuu.org.uk
Cc: linux-kernel@vger.kernel.org, marcelo@conectiva.com.br
Subject: Re: 2.4.21-pre1 broke the ide-tape driver
Date: Tue, 17 Dec 2002 00:27:06 +0100 (MET) [thread overview]
Message-ID: <200212162327.AAA06228@harpo.it.uu.se> (raw)
I wrote:
>On Sun, 15 Dec 2002 02:23:34 +0100, Marc-Christian Petersen wrote:
>>> Kernel 2.4.21-pre1 broke the ide-tape driver: the driver
>>> now hangs during initialisation. 2.2 kernels (with Andre's
>>> IDE patch) and 2.4 up to 2.4.20 do not have this problem.
>>> My box has a Seagate STT8000A ATAPI tape drive as hdd;
>>> hdc is a Philips CD-RW, and the controller is ICH2 (i850 chipset).
>>http://linux.bkbits.net:8080/linux-2.4/patch@1.828?nav=index.html|ChangeSet@-7d|cset@1.828
>
>Addendum: this patch fixes the init-time hang, and ide-tape does
>seem to work fine, but 'rmmod ide-tape' oopses -- 2.4.20-ac2 also
>oopses on 'rmmod ide-tape'.
Solved, I think. Observe ide-tape's module_exit() procedure idetape_exit():
>static void __exit idetape_exit (void)
>{
> ide_drive_t *drive;
> int minor;
>
> for (minor = 0; minor < MAX_HWIFS * MAX_DRIVES; minor++) {
> drive = idetape_chrdevs[minor].drive;
> if (drive != NULL && idetape_cleanup(drive))
> printk(KERN_ERR "ide-tape: %s: cleanup_module() "
> "called while still busy\n", drive->name);
> }
>#ifdef CONFIG_PROC_FS
> if (drive->proc)
> ide_remove_proc_entries(drive->proc, idetape_proc);
>#endif
>
> ide_unregister_module(&idetape_module);
>}
In the "if (drive->proc)" line, drive==NULL when I rmmod ide-tape,
causing the oops.
I'm not sure if ide_remove_proc_entries() is needed or not,
but the current code is obviously broken.
- ide_unregister_module() removes ide-tape's proc entry
(/proc/ide/ideX/hdY/name) for us, at least that's what happens
on my box after I commented out the entire "if (drive->proc) ..."
statement to prevent the oops. So possibly the call should be deleted.
- ide-disk/ide-floppy do the test&call inside the loop rather than after,
so possibly the call should be moved into the loop, and augmented
to be "if (drive && drive->proc) ide_remove_proc_entries(...)".
/Mikael
next reply other threads:[~2002-12-16 23:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-16 23:27 Mikael Pettersson [this message]
2002-12-19 20:08 ` Marcelo Tosatti
-- strict thread matches above, loose matches on Subject: below --
2002-12-20 18:04 Mikael Pettersson
2002-12-16 22:18 Mikael Pettersson
2002-12-15 23:38 Mikael Pettersson
2002-12-16 14:53 ` Alan Cox
2002-12-15 15:37 Mikael Pettersson
2002-12-15 1:19 Mikael Pettersson
2002-12-15 1:23 ` Marc-Christian Petersen
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=200212162327.AAA06228@harpo.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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®