Skip to contentSkip to conversation

[2.6.1] Kernel panic with ppa driver updates

DISCUSSION walt 2 participants 3 messages Feb 8, 2004 2 messages not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

walt

author
#2 lore raw
Quoted 6 lines · [email protected] wrote:

Very interesting... Could you add

	printk("dev = %p, dev->cur_cmd = %p\n", dev, dev->cur_cmd);
right before the call of ppa_pb_claim() call in __ppa_attach(), the
same - right before if (dev->wanted) in the same function and
	printk("dev = %p, dev->cur_cmd set to %p\n", dev, dev->cur_cmd);

right after dev->cur_cmd = cmd; in ppa_queuecommand()?

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.

#3 lore raw
Quoted 10 lines · walt

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...

drivers/scsi/imm.c +1 -1
diff -urN RC2-bk1-base/drivers/scsi/imm.c RC2-bk1-current/drivers/scsi/imm.c
@@ -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;
drivers/scsi/ppa.c +1 -1
diff -urN RC2-bk1-base/drivers/scsi/ppa.c RC2-bk1-current/drivers/scsi/ppa.c
@@ -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;
#4 lore raw
Quoted 9 lines · On Sun, Feb 08, 2004 at 03:48:55AM +0000…
Quoted 8 lines · walt

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

Quoted 4 lines
Quoted 2 lines

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 ;-)