ChangeSet 1.2231.1.9, 2005/03/28 19:18:41-08:00, [EMAIL PROTECTED] [PATCH] slab: 64-bit fix Use kmem_bufctl_t instead of int for the loop counters in check_slabp. Signed-of-by: Manfred Spraul <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
slab.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff -Nru a/mm/slab.c b/mm/slab.c --- a/mm/slab.c 2005-03-28 21:08:13 -08:00 +++ b/mm/slab.c 2005-03-28 21:08:13 -08:00 @@ -1959,18 +1959,17 @@ static void check_slabp(kmem_cache_t *cachep, struct slab *slabp) { - int i; + kmem_bufctl_t i; int entries = 0; check_spinlock_acquired(cachep); /* Check slab's freelist to see if this obj is there. */ for (i = slabp->free; i != BUFCTL_END; i = slab_bufctl(slabp)[i]) { entries++; - if (entries > cachep->num || i < 0 || i >= cachep->num) + if (entries > cachep->num || i >= cachep->num) goto bad; } if (entries != cachep->num - slabp->inuse) { - int i; bad: printk(KERN_ERR "slab: Internal list corruption detected in cache '%s'(%d), slabp %p(%d). Hexdump:\n", cachep->name, cachep->num, slabp, slabp->inuse); - To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html