List Info

Thread: Add sanity check into __bind_irq_vector




Add sanity check into __bind_irq_vector
user name
2007-07-26 01:30:45
Add some sanity checks into __bind_irq_vector().

Signed-off-by: Kenji Kaneshige <kaneshige.kenjijp.fujitsu.com>

---
 arch/ia64/kernel/irq_ia64.c |    3 +++
 1 files changed, 3 insertions(+)

Index: linux-2.6.23-rc1/arch/ia64/kernel/irq_ia64.c
============================================================
=======
--- linux-2.6.23-rc1.orig/arch/ia64/kernel/irq_ia64.c
+++ linux-2.6.23-rc1/arch/ia64/kernel/irq_ia64.c
 -145,6
+145,9  static int __bind_irq_vector(int irq, in
 	int cpu;
 	struct irq_cfg *cfg = &irq_cfg[irq];
 
+	BUG_ON((unsigned)irq >= NR_IRQS);
+	BUG_ON((unsigned)vector >= IA64_NUM_VECTORS);
+
 	cpus_and(mask, domain, cpu_online_map);
 	if (cpus_empty(mask))
 		return -EINVAL;


-
To unsubscribe from this list: send the line
"unsubscribe linux-ia64" in
the body of a message to majordomovger.kernel.org
More majordomo info at  http://vge
r.kernel.org/majordomo-info.html

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )