summaryrefslogtreecommitdiff
path: root/drivers/char/ipmi
diff options
context:
space:
mode:
authorHironobu Ishii <hishii@soft.fujitsu.com>2005-11-11 08:12:21 -0600
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-11 09:23:31 -0800
commit177294d19174cf92de22434bb1fc9a8ecdbbe658 (patch)
tree0d85b7d96db3f6ca48972f4e4667aca0dec707f3 /drivers/char/ipmi
parent9b80b11c3faa460cf42904a1e368bf2cd075aff6 (diff)
[PATCH] ipmi: fix inconsistent spinlock usage
Part of a patch was accidentally reverted, this corrects an inconsistent spinlock use in the IPMI message handler. Signed-off-by: Hironobu Ishii <hishii@soft.fujitsu.com> Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/ipmi')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index c1d06ba449b6..d16bd4b5c117 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2648,7 +2648,7 @@ void ipmi_smi_msg_received(ipmi_smi_t intf,
spin_lock_irqsave(&intf->waiting_msgs_lock, flags);
if (!list_empty(&intf->waiting_msgs)) {
list_add_tail(&msg->link, &intf->waiting_msgs);
- spin_unlock(&intf->waiting_msgs_lock);
+ spin_unlock_irqrestore(&intf->waiting_msgs_lock, flags);
goto out;
}
spin_unlock_irqrestore(&intf->waiting_msgs_lock, flags);
@@ -2657,9 +2657,9 @@ void ipmi_smi_msg_received(ipmi_smi_t intf,
if (rv > 0) {
/* Could not handle the message now, just add it to a
list to handle later. */
- spin_lock(&intf->waiting_msgs_lock);
+ spin_lock_irqsave(&intf->waiting_msgs_lock, flags);
list_add_tail(&msg->link, &intf->waiting_msgs);
- spin_unlock(&intf->waiting_msgs_lock);
+ spin_unlock_irqrestore(&intf->waiting_msgs_lock, flags);
} else if (rv == 0) {
ipmi_free_smi_msg(msg);
}