All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: mingo@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] arch/i386/kernel/io_apic.c: handle a negative return value
Date: Sun, 12 Nov 2006 18:48:26 +0100	[thread overview]
Message-ID: <20061112174826.GC3382@stusta.de> (raw)

The Coverity checker noted that bad things might happen if 
find_isa_irq_apic() returned -1.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6/arch/i386/kernel/io_apic.c.old	2006-11-12 18:41:24.000000000 +0100
+++ linux-2.6/arch/i386/kernel/io_apic.c	2006-11-12 18:42:00.000000000 +0100
@@ -2160,7 +2160,8 @@ static inline void unlock_ExtINT_logic(v
 
 	pin  = find_isa_irq_pin(8, mp_INT);
 	apic = find_isa_irq_apic(8, mp_INT);
-	if (pin == -1)
+
+	if ((pin == -1) || (apic == -1))
 		return;
 
 	entry0 = ioapic_read_entry(apic, pin);


             reply	other threads:[~2006-11-12 17:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-12 17:48 Adrian Bunk [this message]
2006-11-13  8:08 ` [2.6 patch] arch/i386/kernel/io_apic.c: handle a negative return value Ingo Molnar
2006-11-14  0:42 ` Andrew Morton
2006-11-14  6:46   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061112174826.GC3382@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.