From: Kenji Kaneshige Date: Mon, 26 Mar 2007 00:38:42 +0000 (+0900) Subject: [IA64] Fix possible invalid memory access in ia64_setup_msi_irq() X-Git-Tag: v2.6.21-rc6~46^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8a3a0ee736b9a0150c9d894f2c6cc836a62125a1;p=linux-2.6-omap-h63xx.git [IA64] Fix possible invalid memory access in ia64_setup_msi_irq() 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 Signed-off-by: Tony Luck --- diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c index e7220900ea1..ebbeadfee42 100644 --- a/arch/ia64/kernel/msi_ia64.c +++ b/arch/ia64/kernel/msi_ia64.c @@ -68,7 +68,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) { struct msi_msg msg; unsigned long dest_phys_id; - unsigned int irq, vector; + int irq, vector; irq = create_irq(); if (irq < 0)