mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* kernel 2.4.6 segfault in scsi sr.c
@ 2001-07-19  7:57 Martin Vogt
  2001-07-19  8:28 ` pazke
       [not found] ` <20010719123801.A6750@win.tue.nl>
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Vogt @ 2001-07-19  7:57 UTC (permalink / raw)
  To: linux-kernel



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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-07-21 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-19  7:57 kernel 2.4.6 segfault in scsi sr.c Martin Vogt
2001-07-19  8:28 ` pazke
     [not found] ` <20010719123801.A6750@win.tue.nl>
2001-07-21 15:22   ` Martin Vogt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®