mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: "Mikolaj J. Habryn" <dichro-evo@rcpt.to>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5.32 floppy init and misc fixes
Date: Thu, 29 Aug 2002 12:24:03 +0200	[thread overview]
Message-ID: <15725.63043.601068.257742@kim.it.uu.se> (raw)
In-Reply-To: <1030609060.3529.6.camel@orthos>

Mikolaj J. Habryn writes:
 > The floppy driver doesn't clean up it's register_sys_device if it fails
 > to init correctly. The below patch adds the appropriate
 > unregister_sys_device in the various failure paths, and also includes
 > Ewan MacMahon's one-liner for working VCs on devfs-only machines, and a
 > couple of missing #includes. Minimum required to get 2.5.32 working on
 > my Portege.
...
 > --- linux-2.5.32/drivers/block/floppy.c.orig	2002-08-29 16:17:30.000000000 +1000
 > +++ linux-2.5.32/drivers/block/floppy.c	2002-08-29 16:19:20.000000000 +1000
 > @@ -4235,6 +4235,7 @@
 >  	devfs_handle = devfs_mk_dir (NULL, "floppy", NULL);
 >  	if (register_blkdev(MAJOR_NR,"fd",&floppy_fops)) {
 >  		printk("Unable to get major %d for floppy\n",MAJOR_NR);
 > +		unregister_sys_device(&device_floppy);
 >  		return -EBUSY;
 >  	}
 >  
etc.

Floppy has many more problems.
Repeadedly loading and unloading the floppy.o module corrupts
sys_device data structures.
Writing to floppy can give ENOSPC errors even though space exists.
Writing to floppy can OOPS the kernel due to a NULL pointer error.
VFS-over-floppy corrupts data since 2.5.13.
Putting lilo on ext2 on floppy can cause a kernel hang due to an
infinite loop of "buffer layer error".

I have a patch which fixes the {,un}register_sys_device() bugs, NULL
queue bug, zero i_size bug, and fixes read/write enough that raw media
access (e.g. tar or dd to/from /dev/fd0) works. It's in the 2.5-dj tree,
and separately in <http://www.csd.uu.se/~mikpe/linux/patches/2.5/>.

I havent' pushed this to Linus since it's meaningless as long as
the VFS data corruption exists. It was broken by blkdev/VFS changes,
but those responsible haven't yet bothered to repair it.

/Mikael

  reply	other threads:[~2002-08-29 10:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-29  8:17 Mikolaj J. Habryn
2002-08-29 10:24 ` Mikael Pettersson [this message]
2002-08-29 17:30   ` Randy.Dunlap
2002-08-31 14:51 Mikael Pettersson
2002-09-02  3:51 ` Randy.Dunlap

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=15725.63043.601068.257742@kim.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=dichro-evo@rcpt.to \
    --cc=linux-kernel@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 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®