aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2006-07-10 07:44:45 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 16:24:20 -0400
commit58d383a6222d66be9483598c51bae34e7d3c2c37 (patch)
tree54641bdccdb52635c28579c2a08aa941c813a878
parentf620753b9584558cd3bcc1712fca16663aacdce4 (diff)
[PATCH] powerpc: make OF interrupt tree parsing more strict
This patch fixes a bit of boundchecking in the new Open Firmware interrupt tree parsing code. It's important that it fails when things aren't correct in order to trigger fallback mecanisms that are necessary to make some machines work properly. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/powerpc/kernel/prom_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 21009b1f7869..6a7e997c401d 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -881,7 +881,7 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
881 intsize = *tmp; 881 intsize = *tmp;
882 882
883 /* Check index */ 883 /* Check index */
884 if (index * intsize >= intlen) 884 if ((index + 1) * intsize > intlen)
885 return -EINVAL; 885 return -EINVAL;
886 886
887 /* Get new specifier and map it */ 887 /* Get new specifier and map it */