kernel 2.4.6 segfault in scsi sr.c

From: Martin Vogt (mvogt@rhrk.uni-kl.de)
Date: Thu Jul 19 2001 - 02:57:50 EST


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/



This archive was generated by hypermail 2b29 : Mon Jul 23 2001 - 21:00:11 EST