Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c45adc39156dfb0a296df218d62ba8b68cadf12e
Commit:     c45adc39156dfb0a296df218d62ba8b68cadf12e
Parent:     e8c44319c691dfb4a0b039b095204c040df9b01a
Author:     Corey Minyard <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 03:07:08 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Oct 18 14:37:32 2007 -0700

    IPMI: don't init irq until ready
    
    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 <[EMAIL PROTECTED]>
    Cc: Patrick Schoeller <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/ipmi/ipmi_si_intf.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index c1222e9..e018932 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -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;
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to