All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ia64: beyond ARRAY_SIZE of unw.hash
@ 2009-02-22  1:33 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-02-22  1:33 UTC (permalink / raw)
  To: linux-ia64

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 <roel.kluin@gmail.com>
---
diff --git a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c
index 67810b7..b6c0e63 100644
--- a/arch/ia64/kernel/unwind.c
+++ b/arch/ia64/kernel/unwind.c
@@ -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)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-22  1:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-22  1:33 [PATCH] ia64: beyond ARRAY_SIZE of unw.hash Roel Kluin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.