Re: Modified floppies can crash Linux (fwd)

T Taneli Vahakangas (vahakang@cs.Helsinki.FI)
Wed, 25 Mar 1998 03:51:24 +0200 (EET)


On Wed, 25 Mar 1998, David Woodhouse wrote:

>
> > > Yes. Ext2 will panic the kernel even if it can't read a block on a floppy.
> > > I NEVER use ext2 floppies because of this.
> >
> > man mount:
> >
> > errors=continue / errors=remount-ro / errors=panic
> > Define the behaviour when an error is encountered.
> > (Either ignore errors and just mark the file system
> > erroneous and continue, or remount the file system
> > read-only, or panic and halt the system.) The
> > default is set in the filesystem superblock, and
> > can be changed using tune2fs(8).
>
> I've tried all three, and the result is the same. Periodically, the IDE drive
> refused to read certain sectors, and regardless of the "Errors behavior"
> option, it'd still die horribly.

Now that I'm just looking in the files, I see that ext2_panic is called in
several places (grep found 18 occurrences). It makes no checks regarding
mount options; ext2_error does. Could some (or all?) of the calls to
_panic be converted to _error? I'm too tired to check further ...
For a quick reference, the following functions call ext2_panic:
balloc.c: get_group_desc
read_block_bitmap
load__block_bitmap
ext2_free_blocks
ext2_new_block

ialloc.c: ext2_group_desc
read_inode_bitmap
load_inode_bitmap

inode.c: ext2_read_inode
ext2_update_inode

Looking at the functions, they call ext2_error as well... I start to
believe the _panic calls where left there by accident

Somebody check this out, I think it would be pretty uncool to have 2.2
panic on bad floppies (or HDs!) :(

>
>
> ---- ---- ----
> David Woodhouse, Robinson College, CB3 9AN, England. (+44) 0976 658355
> Dave@imladris.demon.co.uk http://dwmw2.robinson.cam.ac.uk
> finger pgp@dwmw2.robinson.cam.ac.uk for PGP key.
>

Taneli <vahakang@cs.helsinki.fi>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu