Index: linux-2.6.18-rc5-mm1/kernel/wait.c =================================================================== --- linux-2.6.18-rc5-mm1.orig/kernel/wait.c 2006-08-27 20:41:48.000000000 -0700 +++ linux-2.6.18-rc5-mm1/kernel/wait.c 2006-09-11 12:52:08.524348654 -0700 @@ -245,9 +245,20 @@ EXPORT_SYMBOL(wake_up_bit); fastcall wait_queue_head_t *bit_waitqueue(void *word, int bit) { const int shift = BITS_PER_LONG == 32 ? 5 : 6; - const struct zone *zone = page_zone(virt_to_page(word)); + const struct zone *zone; unsigned long val = (unsigned long)word << shift | bit; + unsigned long hash = hash_long(val, zone->wait_table_bits); + struct page *page; + printk(KERN_CRIT "bit_waitqueue(%p,%d) shift=%d val=%ld\n", word, bit, shift, val); + page = virt_to_page(word); + printk(KERN_CRIT "page=%p flags=%lx\n", page, page->flags); + printk(KERN_CRIT "zone_id=%d zonetable[0]=%p\n", page_zone_id(page), zone_table[0]); + zone = page_zone(page); + BUG_ON(!zone); + hash = hash_long(val, zone->wait_table_bits); + printk(KERN_CRIT "bit_waitqueue virt_to_page=%p zone=%p hash=%lu\n", + virt_to_page(word), zone, hash); return &zone->wait_table[hash_long(val, zone->wait_table_bits)]; } EXPORT_SYMBOL(bit_waitqueue);