Re: 2.5.64-mm6: oops in elv_remove_request

Jens Axboe
2003-03-24T13:04:06Z

On Mon, Mar 17 2003, Jeremy Fitzhardinge wrote:
> On Mon, 2003-03-17 at 00:05, Jens Axboe wrote:
> > On Sat, Mar 15 2003, Jeremy Fitzhardinge wrote:
> > > On Sat, 2003-03-15 at 00:15, Jens Axboe wrote:
> > > > I can reliably crash the box with SG_IO -> ide-cd here, so I'm hoping
> > > > there's a connection. Need to move it to a box where nmi watchdog
> > > > actually works...
> > >
> > > And wouldn't you know it - with -mm7 it seems to be working fine...
> > ^^
> > What is 'it'?
>
> Sorry: I meant "cdrecord dev=/dev/hdc -checkdrive" returns correct
> "supported modes".
>
> I was wrong, however: it is still broken. Sometimes it will return
> version 2/format 2 results time after time (with supported modes), but
> then I leave it for a while and it reverts to returning 0/1 results with
> no supported modes. There doesn't seem to be any rhyme or reason about
> it: the "put a disc in and it works" trick doesn't work any more.
>
> This is with 2.5.64-mm8. What other details would help? strace output
> of cdrecord?

Does this patch help at all? At least it solves the hard hangs (machine
double faults) in some circumstances. Linus, please apply. It may not be
this bug, but it's at least one bug.

===== drivers/ide/ide-cd.c 1.40 vs edited =====
--- 1.40/drivers/ide/ide-cd.c Fri Mar 14 01:49:24 2003
+++ edited/drivers/ide/ide-cd.c Mon Mar 24 14:08:15 2003
@@ -1749,8 +1749,8 @@
/*
* pad, if necessary
*/
- if (len) {
- while (len) {
+ if (len > 0) {
+ while (len > 0) {
int pad = 0;

xferfunc(drive, &pad, sizeof(pad));

--
Jens Axboe