[POWERPC] Make OF interrupt tree parsing more strict
Benjamin Herrenschmidt
benh at kernel.crashing.org
Mon Jul 10 16:42:33 EST 2006
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 at kernel.crashing.org>
Index: linux-irq-work/arch/powerpc/kernel/prom_parse.c
===================================================================
--- linux-irq-work.orig/arch/powerpc/kernel/prom_parse.c 2006-07-10 12:39:08.000000000 +1000
+++ linux-irq-work/arch/powerpc/kernel/prom_parse.c 2006-07-10 12:43:51.000000000 +1000
@@ -881,7 +881,7 @@
intsize = *tmp;
/* Check index */
- if (index * intsize >= intlen)
+ if ((index + 1) * intsize > intlen)
return -EINVAL;
/* Get new specifier and map it */
More information about the Linuxppc-dev
mailing list