mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Vogt <mvogt@rhrk.uni-kl.de>
To: linux-kernel@vger.kernel.org
Subject: kernel 2.4.6 segfault in scsi sr.c
Date: Thu, 19 Jul 2001 09:57:50 +0200	[thread overview]
Message-ID: <20010719095750.B36012@rhrk.uni-kl.de> (raw)



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



             reply	other threads:[~2001-07-19  7:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-19  7:57 Martin Vogt [this message]
2001-07-19  8:28 ` pazke
     [not found] ` <20010719123801.A6750@win.tue.nl>
2001-07-21 15:22   ` Martin Vogt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010719095750.B36012@rhrk.uni-kl.de \
    --to=mvogt@rhrk.uni-kl.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®