[Top] [All Lists]

Re: Floppy driver bug.

Subject: Re: Floppy driver bug.
From: Systemkennung Linux <>
Date: Thu, 30 Nov 1995 13:00:52 +0100 (MET)
In-reply-to: <> from "Andreas Busse" at Nov 30, 95 12:23:34 pm

>  > I just found a bug in the floppy driver.  Andy disabled the support for
>  > the second floppy driver.  Unfortunately there is a bug that then
>  > results in random writes into the memory.
> Hmmm. Is this a bug in the standard driver, or is this my fault?

It is a bug in the standard driver that was activated by your changes.
Just look into drivers/block/floppy.c, into function set_fdc().  This
functions calls set_dor() twice.  Once for controller fdc and once
for controller 1-fdc.  The later call results in erroneous memory
accesses when N_FDC (in <asm/floppy.h>) has been defined to 1, not two.
Just put #if N_FDC > 1 ... #endif around the second call and everything
is ok.

Finding this bug was a bit of luck - I wondered about certain "unplaned"
memory accesses when debugging something else.  The consequences however
are fatal - every process that is just running when set_fdc is being
called gets "tuned" ...


<Prev in Thread] Current Thread [Next in Thread>