kernel 2.4.6 segfault in scsi sr.c

Martin Vogt (mvogt@rhrk.uni-kl.de)
Thu, 19 Jul 2001 09:57:50 +0200


Hello,

I have an Adaptec AIC-7881U (rev 1) controller and kernel 2.4.6.
When I try to mount a CD the kernel segfaults.
This is the lines it prints:

>sr0: unsupported sector size 2336.

And then not so usefull things like:

>Unable to handle kernel NULL pointer dereference at virtual address 00000018
> printing eip:
>c683a61f
>*pde = 00000000
>Oops: 0000
[.....]

I have looked in the source code:

drivers/scsi/sr.c:

In line 604 begins a switch statement:

switch (sector_size) {
case 0:
case 2340:
case 2352:
sector_size = 2048;
/* fall through */
case 2048:
scsi_CDs[i].capacity *= 4;
/* fall through */
case 512:
break;
default:
kernel message --> printk("sr%d: unsupported sector size %d.\n",
i, sector_size);
scsi_CDs[i].capacity = 0;
scsi_CDs[i].needs_sector_size = 1;

//
// here it still has the "wrong" sector_size
//
}

scsi_CDs[i].device->sector_size = sector_size;

// and here it stores it.

I think that the "unsupported" sector size then leads to a segfault
somewhere later in the code.

Martin

-
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/