public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][BUG] Fix possible invalid memory access in ia64_setup_msi_irq()
@ 2007-03-26  0:38 Kenji Kaneshige
  0 siblings, 0 replies; only message in thread
From: Kenji Kaneshige @ 2007-03-26  0:38 UTC (permalink / raw)
  To: linux-ia64

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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-26  0:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-26  0:38 [PATCH][BUG] Fix possible invalid memory access in ia64_setup_msi_irq() Kenji Kaneshige

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox