Commit 264132bc authored by Linus Torvalds's avatar Linus Torvalds

Fix "check_slabp" printout size calculation

We want to use the "struct slab" size, not the size of the pointer to
same.  As it is, we'd not print out the last <n> entry pointers in the
slab (where <n> is ~10, depending on whether it's a 32-bit or 64-bit
kernel).

Gaah, that slab code was written by somebody who likes unreadable crud.
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 24ed6e2c
...@@ -2554,7 +2554,7 @@ static void check_slabp(struct kmem_cache *cachep, struct slab *slabp) ...@@ -2554,7 +2554,7 @@ static void check_slabp(struct kmem_cache *cachep, struct slab *slabp)
"slab: Internal list corruption detected in cache '%s'(%d), slabp %p(%d). Hexdump:\n", "slab: Internal list corruption detected in cache '%s'(%d), slabp %p(%d). Hexdump:\n",
cachep->name, cachep->num, slabp, slabp->inuse); cachep->name, cachep->num, slabp, slabp->inuse);
for (i = 0; for (i = 0;
i < sizeof(slabp) + cachep->num * sizeof(kmem_bufctl_t); i < sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t);
i++) { i++) {
if ((i % 16) == 0) if ((i % 16) == 0)
printk("\n%03x:", i); printk("\n%03x:", i);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment