On Fri, Mar 24, 2006 at 05:55:32PM -0600, Corey Minyard wrote:
> 
> You want to do a patch?

Something like this I think.  I gave this to the folks who tripped the
bug in the first place, for their testing hopefully Monday.  Thanks to
you and Jordan for diagnosing.



The start of the kernel thread needs to be moved to after the call
to ipmi_register_smi().  Otherwise, a message could come in before the
upper layer was ready to receive it.

Signed-off-by: Matt Domsch <[EMAIL PROTECTED]>

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index e59b638..2d044c6 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2328,9 +2328,6 @@ static int init_one_smi(int intf_num, st
        new_smi->si_timer.expires = jiffies + SI_TIMEOUT_JIFFIES;
 
        add_timer(&(new_smi->si_timer));
-       if (new_smi->si_type != SI_BT)
-               new_smi->thread = kthread_run(ipmi_thread, new_smi,
-                                             "kipmi%d", new_smi->intf_num);
 
        rv = ipmi_register_smi(&handlers,
                               new_smi,
@@ -2366,6 +2363,9 @@ static int init_one_smi(int intf_num, st
        }
 
        *smi = new_smi;
+       if (new_smi->si_type != SI_BT)
+               new_smi->thread = kthread_run(ipmi_thread, new_smi,
+                                             "kipmi%d", new_smi->intf_num);
 
        printk(" IPMI %s interface initialized\n", si_type[intf_num]);
 
@@ -2373,7 +2373,7 @@ static int init_one_smi(int intf_num, st
 
  out_err_stop_timer:
        atomic_inc(&new_smi->stop_operation);
-       wait_for_timer_and_thread(new_smi);
+       del_timer_sync(&new_smi->si_timer);
 
  out_err:
        if (new_smi->intf)




-- 
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to