ia64: beyond ARRAY_SIZE of unw.hash
PATCH 1/1 ia64: beyond ARRAY_SIZE of unw.hash
static struct {
... :114
unsigned short hash[UNW_HASH_SIZE];
... :147
} unw = {
... :228
.hash = { [0 ... UNW_HASH_SIZE - 1] = -1 },...
};
This is a bug, isn't it? --------------------------->8-------------8<------------------------------ Do not go beyond ARRAY_SIZE of unw.hash
Signed-off-by Roel Kluin <[email protected]>
---
arch/ia64/kernel/unwind.c +1 -1
@@ -2149,7 +2149,7 @@ unw_remove_unwind_table (void *handle)/* next, remove hash table entries for this table */ -for (index =0 ; index <=UNW_HASH_SIZE ; ++index) { +for (index =0 ; index <UNW_HASH_SIZE ; ++index) { tmp = unw.cache + unw.hash[index];if (unw.hash[index] >=UNW_CACHE_SIZE || tmp->ip < table->start || tmp->ip >= table->end)