[IA64] Do not go beyond ARRAY_SIZE of unw.hash
authorRoel Kluin <roel.kluin@gmail.com>
Sun, 22 Feb 2009 01:33:28 +0000 (02:33 +0100)
committerTony Luck <tony.luck@intel.com>
Wed, 25 Feb 2009 19:48:04 +0000 (11:48 -0800)
static struct {

... :114
        unsigned short hash[UNW_HASH_SIZE];

... :2152
for (index = 0; index <= UNW_HASH_SIZE; ++index) {

This is a bug, isn't it?

s/<=/</

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/unwind.c

index 67810b77d998768199b3978d288130968e837865..b6c0e63a0bf61535386fff325adaf5f3e40e2932 100644 (file)
@@ -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)