zone->wait_table_bits contains a wrong value
I am not sure if this is a bug.
The return value of wait_table_bits(unsigned long size) is too large. hash_long(val,zone->wait_table_bits) exceeds the maximum array index of zone->wait_table.
mm/page_alloc.c
/*
* This is an integer logarithm so that shifts can be used later
* to extract the more random high bits from the multiplicative
* hash function before the remainder is taken.
*/
static inline unsigned long wait_table_bits(unsigned long size)
{
return ffz(~size);
}assumption:
wait_table_size := 0x10
conclusion:
wait_table_bits(0x10) = 5
hash_long(val,5) = [ 0 ; 0x1f ]
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>