From: Ingo Molnar Fix 32-bitness bugs in mm/slob.c. Signed-off-by: Ingo Molnar Cc: Matt Mackall Signed-off-by: Andrew Morton --- mm/slob.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -puN mm/slob.c~slob-introduce-the-slob-allocator-64-bit-fixes mm/slob.c --- devel/mm/slob.c~slob-introduce-the-slob-allocator-64-bit-fixes 2005-12-12 00:55:44.000000000 -0800 +++ devel-akpm/mm/slob.c 2005-12-12 00:55:44.000000000 -0800 @@ -198,7 +198,7 @@ void kfree(const void *block) if (!block) return; - if (!((unsigned int)block & (PAGE_SIZE-1))) { + if (!((unsigned long)block & (PAGE_SIZE-1))) { /* might be on the big block list */ spin_lock_irqsave(&block_lock, flags); for (bb = bigblocks; bb; last = &bb->next, bb = bb->next) { @@ -227,7 +227,7 @@ unsigned int ksize(const void *block) if (!block) return 0; - if (!((unsigned int)block & (PAGE_SIZE-1))) { + if (!((unsigned long)block & (PAGE_SIZE-1))) { spin_lock_irqsave(&block_lock, flags); for (bb = bigblocks; bb; bb = bb->next) if (bb->pages == block) { @@ -326,7 +326,7 @@ void kmem_cache_init(void) void *p = slob_alloc(PAGE_SIZE, 0, PAGE_SIZE-1); if (p) - free_page((unsigned int)p); + free_page((unsigned long)p); mod_timer(&slob_timer, jiffies + HZ); } _