Commit 58d383a6 authored by Segher Boessenkool's avatar Segher Boessenkool Committed by Linus Torvalds

[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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f620753b
......@@ -881,7 +881,7 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
intsize = *tmp;
/* Check index */
if (index * intsize >= intlen)
if ((index + 1) * intsize > intlen)
return -EINVAL;
/* Get new specifier and map it */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment