Re: [PATCH] off-by-1 error in ide-probe (2.4.x)

Jens Axboe (axboe@suse.de)
Sun, 18 Mar 2001 22:35:58 +0100


On Sun, Mar 18 2001, Paul Gortmaker wrote:
> There is a potentially serious bug in ide-probe.c in which max_sectors
> is set to 256 instead of 255. I am surprised that this hasn't bit anyone
> else yet. Perhaps because you need a disk that is slow in comparison to
> the host in order for the queue to climb up to and then hit the 256, at
> which point it then falls over.

You don't need a slow disk, it's trivial to provoke 256 sector sized
request on even the fastest disk available. People hit it all the time,
just with working drives...

> For example, with an old 700MB Maxtor on a "fast" 486, VL-bus, PIO,
> hdparm -c1 -m8 -u1, I could pretty much on demand generate the following
> error by multiple builds, or by the final linking of any big project:

The 256 is _not_ a bug in the driver, it's more likely a bug in your
drive. 256 is a perfectly legal transfer size. That said, maybe it is
a good idea to leave it at 255 just for safety on drives not handling
0 sectors == 128kB transfer.

-- 
Jens Axboe

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/