All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: stefan@jaschke-net.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: Problems with Toshiba SD-W2002 DVD-RAM drive (IDE)
Date: Thu, 19 Apr 2001 13:46:01 +0200	[thread overview]
Message-ID: <20010419134601.P16822@suse.de> (raw)
In-Reply-To: <01041714250400.01376@antares> <20010418123941.H492@suse.de> <20010418143953.D490@suse.de> <01041913393800.01240@antares>
In-Reply-To: <01041913393800.01240@antares>; from s-jaschke@t-online.de on Thu, Apr 19, 2001 at 01:39:38PM +0200

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

On Thu, Apr 19 2001, Stefan Jaschke wrote:
> Hi Jens,
> 
> I applied your patch to 2.4.4-pre4. It compiled fine, but crashed during
> boot (just right after the IDE init) with
> -------------------
> Uniform CD-ROM driver Revision: 3.12
> Unable to handle kernel NULL pointer dereference at virtual address 00000000
> printing eip: ...
> Oops: 0000
> ...
> -------------------

This should fix it.

-- 
Jens Axboe


[-- Attachment #2: cd-get-entry-1 --]
[-- Type: text/plain, Size: 743 bytes --]

--- drivers/cdrom/cdrom.c~	Thu Apr 19 13:44:46 2001
+++ drivers/cdrom/cdrom.c	Thu Apr 19 13:45:33 2001
@@ -350,6 +350,12 @@
 {
 	int i, nr, foo;
 
+	if (!cdrom_numbers) {
+		int n_entries = CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8);
+		cdrom_numbers = kmalloc(n_entries * sizeof(unsigned long), GFP_KERNEL);
+		memset(cdrom_numbers, 0, n_entries * sizeof(unsigned long));
+	}
+
 	nr = 0;
 	foo = -1;
 	for (i = 0; i < CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8); i++) {
@@ -2696,10 +2702,6 @@
 
 static int __init cdrom_init(void)
 {
-	int n_entries = CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8);
-
-	cdrom_numbers = kmalloc(n_entries * sizeof(unsigned long), GFP_KERNEL);
-
 #ifdef CONFIG_SYSCTL
 	cdrom_sysctl_register();
 #endif

  reply	other threads:[~2001-04-19 11:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-17 12:25 Problems with Toshiba SD-W2002 DVD-RAM drive (IDE) Stefan Jaschke
2001-04-18 10:39 ` Jens Axboe
2001-04-18 12:39   ` Jens Axboe
2001-04-18 22:12     ` Stefan Jaschke
2001-04-19 11:39     ` Stefan Jaschke
2001-04-19 11:46       ` Jens Axboe [this message]
2001-04-19 12:13         ` Stefan Jaschke
2001-04-19 12:15           ` Jens Axboe
2001-04-19 12:44             ` Stefan Jaschke
2001-04-19 13:03               ` Jens Axboe
2001-04-19 21:11                 ` Stefan Jaschke
2001-04-21 16:47                 ` Stefan Jaschke

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=20010419134601.P16822@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan@jaschke-net.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.