From: Paul Gortmaker <p_gortmaker@yahoo.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "Marcelo E. Magallon" <marcelo.magallon@bigfoot.com>,
linux-kernel@vger.kernel.org
Subject: Re: Oops when loading floppy.o
Date: Sun, 26 Aug 2001 06:40:02 -0400 [thread overview]
Message-ID: <3B88D202.429B1F59@yahoo.com> (raw)
In-Reply-To: <E15ais1-00081T-00@the-village.bc.nu>
Alan Cox wrote:
> I can reproduce it to order. The floppy driver has done this since before
> 2.4.0 in this specific case I think. It actual stops installs working on
> the problem box I have
>
> > >>EIP; c0117602 <__run_task_queue+12/60> <=====
> > Trace; c011a2f6 <immediate_bh+16/20>
> > Trace; c011756a <bh_action+1a/50>
>
> Thats the important bit I think, its not killing off all the stuff it set up
> when it exits. Its not an XFS triggered bug, so the trace is useful
It does a reset and as part of that it registers an empty task which may not
be completed before the module disappears. Also noticed an extra del_timer
and that it should return ENODEV (not EIO) when a controller is not present.
Sensible fix would be to not queue these empty tasks at all, but minimal fix
(2.4.x) is to just make sure they are off the queue before module vanishes.
Please test as the code in floppy.c is showing 10+yrs of moss growth and
is not 100% clear to follow :)
Paul.
--- drivers/block/floppy.c~ Sun Aug 12 06:06:25 2001
+++ drivers/block/floppy.c Sun Aug 26 06:24:12 2001
@@ -124,6 +124,11 @@
* - s/suser/capable/
*/
+/*
+ * 2001/08/26 -- Paul Gortmaker - fix insmod oops on machines with no
+ * floppy controller (lingering task on list after module is gone... boom.)
+ */
+
#define FLOPPY_SANITY_CHECK
#undef FLOPPY_SILENT_DCL_CLEAR
@@ -4144,7 +4149,7 @@
return 0;
}
-static int have_no_fdc= -EIO;
+static int have_no_fdc= -ENODEV;
int __init floppy_init(void)
@@ -4200,7 +4205,6 @@
del_timer(&fd_timeout);
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
devfs_unregister_blkdev(MAJOR_NR,"fd");
- del_timer(&fd_timeout);
return -EBUSY;
}
@@ -4259,9 +4263,7 @@
if (have_no_fdc)
{
DPRINT("no floppy controllers found\n");
- floppy_tq.routine = (void *)(void *) empty;
- mark_bh(IMMEDIATE_BH);
- schedule();
+ run_task_queue(&tq_immediate);
if (usage_count)
floppy_release_irq_and_dma();
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
prev parent reply other threads:[~2001-08-26 10:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-25 17:11 Oops when loading floppy.o Marcelo E. Magallon
2001-08-25 19:13 ` Alan Cox
2001-08-26 10:40 ` Paul Gortmaker [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=3B88D202.429B1F59@yahoo.com \
--to=p_gortmaker@yahoo.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.magallon@bigfoot.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