[PATCH][BUG] Fix possible invalid memory access in ia64_setup_msi_irq()

From: Kenji Kaneshige <kaneshige.kenji_at_jp.fujitsu.com>
Date: 2007-03-26 10:38:42
The following 'if' statement in ia64_setup_msi_irq() always fails even
if create_irq() returns <0 value, because variable 'irq' is defined as
unsigned int. It would cause invalid memory access.

        irq = create_irq();
        if (irq < 0)
                return irq;

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
---
 arch/ia64/kernel/msi_ia64.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.21-rc5/arch/ia64/kernel/msi_ia64.c
===================================================================
--- linux-2.6.21-rc5.orig/arch/ia64/kernel/msi_ia64.c	2007-03-26 09:24:26.000000000 +0900
+++ linux-2.6.21-rc5/arch/ia64/kernel/msi_ia64.c	2007-03-26 09:25:51.000000000 +0900
@@ -68,7 +68,7 @@
 {
 	struct msi_msg	msg;
 	unsigned long	dest_phys_id;
-	unsigned int	irq, vector;
+	int	irq, vector;
 
 	irq = create_irq();
 	if (irq < 0)

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Mar 26 10:41:41 2007

This archive was generated by hypermail 2.1.8 : 2007-03-26 10:42:05 EST