From: Corey Minyard <minyard@acm.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Patrick Schoeller <Patrick.Schoeller@hp.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/7] IPMI: don't init irq until ready
Date: Fri, 12 Oct 2007 11:37:23 -0500 [thread overview]
Message-ID: <20071012163723.GA22142@minyard.local> (raw)
From: Corey Minyard <cminyard@mvista.com>
Patrick found a race at startup. Interrupts were being enabled for
the IPMI interface before the driver was really ready to handle them.
This could result in an oops if something was pending on the interface
at startup and interrupt were already enabled (technically shouldn't
happen, but need to cover for this in real life). So move the IRQ
setup to the code that starts the actual IPMI processing.
Not needed for the stable kernel, very few IPMI devices have interrupts.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Patrick Schoeller <Patrick.Schoeller@hp.com>
---
Index: linux-2.6.21/drivers/char/ipmi/ipmi_si_intf.c
===================================================================
--- linux-2.6.21.orig/drivers/char/ipmi/ipmi_si_intf.c
+++ linux-2.6.21/drivers/char/ipmi/ipmi_si_intf.c
@@ -1006,6 +1006,10 @@ static int smi_start_processing(void
new_smi->intf = intf;
+ /* Try to claim any interrupts. */
+ if (new_smi->irq_setup)
+ new_smi->irq_setup(new_smi);
+
/* Set up the timer that drives the interface. */
setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi);
new_smi->last_timeout_jiffies = jiffies;
@@ -2762,10 +2766,6 @@ static int try_smi_init(struct smi_info
setup_oem_data_handler(new_smi);
setup_xaction_handlers(new_smi);
- /* Try to claim any interrupts. */
- if (new_smi->irq_setup)
- new_smi->irq_setup(new_smi);
-
INIT_LIST_HEAD(&(new_smi->xmit_msgs));
INIT_LIST_HEAD(&(new_smi->hp_xmit_msgs));
new_smi->curr_msg = NULL;
reply other threads:[~2007-10-12 16:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20071012163723.GA22142@minyard.local \
--to=minyard@acm.org \
--cc=Patrick.Schoeller@hp.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox