Skip to content

Commit

Permalink
IPMI: don't init irq until ready
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Patrick Schoeller <Patrick.Schoeller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Corey Minyard authored and Linus Torvalds committed Oct 18, 2007
1 parent e8c4431 commit c45adc3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,10 @@ static int smi_start_processing(void *send_info,

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;
Expand Down Expand Up @@ -2765,10 +2769,6 @@ static int try_smi_init(struct smi_info *new_smi)
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;
Expand Down

0 comments on commit c45adc3

Please sign in to comment.