lkml.org 
[lkml]   [2001]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: Problems with Toshiba SD-W2002 DVD-RAM drive (IDE)
    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

    --- 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
    \
     
     \ /
      Last update: 2005-03-22 13:26    [W:0.032 / U:60.984 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site