Skip to content

Commit

Permalink
[IA64] Fix possible invalid memory access in ia64_setup_msi_irq()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Kenji Kaneshige authored and Tony Luck committed Mar 29, 2007
1 parent a76c0b9 commit 8a3a0ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/ia64/kernel/msi_ia64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8a3a0ee

Please sign in to comment.