lkml.org 
[lkml]   [2004]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] Re: [2.6.1] Kernel panic with ppa driver updates
    On Sat, Feb 07, 2004 at 07:35:52PM -0800, walt wrote:
    > Only one of the print statements was executed, apparently:
    >
    > ppa: Version 2.07 (for Linux 2.4.x)
    > dev = dfd67940, dev->cur_cmd = 7232b2df
    > Unable to handle kernel paging request at virtual address 7232b403
    > printing eip:
    > c027bc25
    >
    > The remainder of the message was identical to the previous post -- no
    > extra printed messages anywhere.

    Aaaaaargh.... dev = memset(dev, 0, sizeof(dev)); - spot the bug here...

    Fix follows. Linus, apply it, please. Amazing that it survives in modular
    case...

    diff -urN RC2-bk1-base/drivers/scsi/imm.c RC2-bk1-current/drivers/scsi/imm.c
    --- RC2-bk1-base/drivers/scsi/imm.c Thu Feb 5 18:48:49 2004
    +++ RC2-bk1-current/drivers/scsi/imm.c Sat Feb 7 22:44:16 2004
    @@ -1153,7 +1153,7 @@
    if (!dev)
    return -ENOMEM;

    - memset(dev, 0, sizeof(dev));
    + memset(dev, 0, sizeof(imm_struct));

    dev->base = -1;
    dev->mode = IMM_AUTODETECT;
    diff -urN RC2-bk1-base/drivers/scsi/ppa.c RC2-bk1-current/drivers/scsi/ppa.c
    --- RC2-bk1-base/drivers/scsi/ppa.c Thu Feb 5 18:48:57 2004
    +++ RC2-bk1-current/drivers/scsi/ppa.c Sat Feb 7 22:44:27 2004
    @@ -1010,7 +1010,7 @@
    dev = kmalloc(sizeof(ppa_struct), GFP_KERNEL);
    if (!dev)
    return -ENOMEM;
    - memset(dev, 0, sizeof(dev));
    + memset(dev, 0, sizeof(ppa_struct));
    dev->base = -1;
    dev->mode = PPA_AUTODETECT;
    dev->recon_tmo = PPA_RECON_TMO;
    -
    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/
    \
     
     \ /
      Last update: 2005-03-22 14:00    [W:0.025 / U:121.444 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site