From: Manfred Spraul <manfred@colorfullife.com>
To: "Murray J. Root" <murrayr@brain.org>,
linux-kernel@vger.kernel.org, Andre Hedrick <andre@linux-ide.org>
Subject: Re: 2.5.40-ac4 kernel BUG at slab.c:1477!
Date: Sun, 06 Oct 2002 15:31:03 +0200 [thread overview]
Message-ID: <3DA03B17.8010501@colorfullife.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 941 bytes --]
> This happens at random during boot when loading modules.
> About half of the time ide-scsi works fine.
> The system continues to boot after the BUG with /dev/hdc unaccessible.
from mm/slab.c:
1475 if (xchg((unsigned long *)objp, RED_MAGIC1) != RED_MAGIC2)
1476 /* Either write before start, or a double free. */
1477 BUG();
You run an uniprocessor kernel, with slab debugging enabled, and the
red-zoning test notices a write before the beginning of the buffer
during scsi_probe_and_add_lun, with ide-scsi.
Andre: Do you know if ide-scsi makes any assumptions about memory
alignment of the input buffers? With slab debugging disabled, the
alignment is 32 or 64 bytes, with debugging enabled, it's just 4 byte
[actually sizeof(void*)] aligned.
Murray, could you apply the attached patch? It dumps the redzone value
during scsi_probe_and_add_lun. Hopefully this will help to find who
corrupts the buffers.
--
Manfred
[-- Attachment #2: patch-scsi-debug --]
[-- Type: text/plain, Size: 1400 bytes --]
--- 2.5/drivers/scsi/scsi_scan.c Sun Sep 22 06:25:17 2002
+++ build-2.5/drivers/scsi/scsi_scan.c Sun Oct 6 14:21:58 2002
@@ -1526,8 +1526,9 @@
GFP_DMA : 0);
if (scsi_result == NULL)
goto alloc_failed;
-
+printk(KERN_INFO"scsi_result: %p, start %lxh.\n",scsi_result, ((unsigned long*)scsi_result)[-1]);
scsi_probe_lun(sreq, scsi_result, &bflags);
+printk(KERN_INFO"scsi_result: %p, start %lxh.\n",scsi_result, ((unsigned long*)scsi_result)[-1]);
if (sreq->sr_result)
res = SCSI_SCAN_NO_RESPONSE;
else {
@@ -1550,8 +1551,10 @@
" no device added\n"));
res = SCSI_SCAN_TARGET_PRESENT;
} else {
+printk(KERN_INFO"scsi_result: %p, start %lxh.\n",scsi_result, ((unsigned long*)scsi_result)[-1]);
res = scsi_add_lun(sdevscan, &sdev, sreq, scsi_result,
&bflags);
+printk(KERN_INFO"scsi_result: %p, start %lxh.\n",scsi_result, ((unsigned long*)scsi_result)[-1]);
if (res == SCSI_SCAN_LUN_PRESENT) {
BUG_ON(sdev == NULL);
if ((bflags & BLIST_KEY) != 0) {
@@ -1574,9 +1577,13 @@
}
}
}
+printk(KERN_INFO"scsi_result: %p, start %lxh.\n",scsi_result, ((unsigned long*)scsi_result)[-1]);
kfree(scsi_result);
+printk(KERN_INFO"after kfree\n");
scsi_release_request(sreq);
+printk(KERN_INFO"after release_request\n");
scsi_release_commandblocks(sdevscan);
+printk(KERN_INFO"after release_commandblocks\n");
return res;
alloc_failed:
next reply other threads:[~2002-10-06 13:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-06 13:31 Manfred Spraul [this message]
2002-10-06 22:43 ` 2.5.40-ac4 kernel BUG at slab.c:1477! Murray J. Root
2002-10-08 2:58 ` Murray J. Root
2002-10-06 23:15 ` Murray J. Root
2002-10-07 1:48 ` Andre Hedrick
2002-10-07 15:43 ` Manfred Spraul
-- strict thread matches above, loose matches on Subject: below --
2002-10-06 6:58 Murray J. Root
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=3DA03B17.8010501@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=andre@linux-ide.org \
--cc=linux-kernel@vger.kernel.org \
--cc=murrayr@brain.org \
/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.