* [PATCH] Re: [2.6.1] Kernel panic with ppa driver updates
2004-02-08 3:35 ` walt
@ 2004-02-08 3:48 ` viro
2004-02-08 3:50 ` viro
0 siblings, 1 reply; 3+ messages in thread
From: viro @ 2004-02-08 3:48 UTC (permalink / raw)
To: walt; +Cc: Linus Torvalds, linux-kernel
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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Re: [2.6.1] Kernel panic with ppa driver updates
2004-02-08 3:48 ` [PATCH] " viro
@ 2004-02-08 3:50 ` viro
0 siblings, 0 replies; 3+ messages in thread
From: viro @ 2004-02-08 3:50 UTC (permalink / raw)
To: walt; +Cc: Linus Torvalds, linux-kernel
On Sun, Feb 08, 2004 at 03:48:55AM +0000, viro@parcelfarce.linux.theplanet.co.uk wrote:
> 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...
s/dev = // - it's not _that_ bad ;-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Re: [2.6.1] Kernel panic with ppa driver updates
[not found] ` <fa.n3claqs.1ihaob0@ifi.uio.no>
@ 2004-02-08 5:06 ` walt
0 siblings, 0 replies; 3+ messages in thread
From: walt @ 2004-02-08 5:06 UTC (permalink / raw)
To: viro; +Cc: linux-kernel
viro@parcelfarce.linux.theplanet.co.uk wrote:
> On Sat, Feb 07, 2004 at 07:35:52PM -0800, walt wrote:
>>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
> Aaaaaargh.... 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;
> -
Yes, it's fixed now. Thank you!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-08 5:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <fa.fsggm3p.17jmtpp@ifi.uio.no>
[not found] ` <fa.n3claqs.1ihaob0@ifi.uio.no>
2004-02-08 5:06 ` [PATCH] Re: [2.6.1] Kernel panic with ppa driver updates walt
[not found] <fa.db71fu4.1gju7jo@ifi.uio.no>
[not found] ` <fa.n1cha2m.1hhep3a@ifi.uio.no>
2004-02-08 3:35 ` walt
2004-02-08 3:48 ` [PATCH] " viro
2004-02-08 3:50 ` viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox