aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_msghandler.c
diff options
context:
space:
mode:
authorCorey Minyard <minyard@acm.org>2006-03-31 05:30:39 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-31 15:18:54 -0500
commit453823ba08ba762b3d58934b6dce75edce37169e (patch)
tree80170bf784145621467ba83ea44d25dc3e5e5964 /drivers/char/ipmi/ipmi_msghandler.c
parentee37df7877eeaa16d7761cce64854110a7c17ad9 (diff)
[PATCH] IPMI: fix startup race condition
Matt Domsch noticed a startup race with the IPMI kernel thread, it was possible (though extraordinarly unlikely) that a message could come in before the upper layer was ready to handle it. This patch splits the startup processing of an IPMI interface into two parts, one to get ready and one to actually start the processes to receive messages from the interface. [akpm@osdl.org: cleanups] Signed-off-by: Corey Minyard <minyard@acm.org> Cc: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/ipmi/ipmi_msghandler.c')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 40eb005b9d7..a0b6f797d97 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2305,8 +2305,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
2305 void *send_info, 2305 void *send_info,
2306 struct ipmi_device_id *device_id, 2306 struct ipmi_device_id *device_id,
2307 struct device *si_dev, 2307 struct device *si_dev,
2308 unsigned char slave_addr, 2308 unsigned char slave_addr)
2309 ipmi_smi_t *new_intf)
2310{ 2309{
2311 int i, j; 2310 int i, j;
2312 int rv; 2311 int rv;
@@ -2388,9 +2387,9 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
2388 if (rv) 2387 if (rv)
2389 goto out; 2388 goto out;
2390 2389
2391 /* FIXME - this is an ugly kludge, this sets the intf for the 2390 rv = handlers->start_processing(send_info, intf);
2392 caller before sending any messages with it. */ 2391 if (rv)
2393 *new_intf = intf; 2392 goto out;
2394 2393
2395 get_guid(intf); 2394 get_guid(intf);
2396 2395