summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorHironobu Ishii <hishii@soft.fujitsu.com>2005-09-23 13:24:08 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-23 13:35:37 -0700
commite7c965084392e23a3494f0247c75795360a3fa0d (patch)
tree24fab39beb7cf8a5d8fd270e3add76fc3d2dce91 /drivers/char
parent67b108131df1230bad20a7279a8897de123d690b (diff)
downloadkernel-common-e7c965084392e23a3494f0247c75795360a3fa0d.tar.gz
kernel-common-e7c965084392e23a3494f0247c75795360a3fa0d.tar.bz2
kernel-common-e7c965084392e23a3494f0247c75795360a3fa0d.zip
[PATCH] ipmi_msghandler: inconsistent spin_lock usage
I found an inconsistent spin_lock usage in ipmi_smi_msg_received. Signed-off-by: Hironobu Ishii <hishii@soft.fujitsu.com> Cc: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-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 463351d4f942..32fa82c78c73 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2620,7 +2620,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_unlock;
}
spin_unlock_irqrestore(&(intf->waiting_msgs_lock), flags);
@@ -2629,9 +2629,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);
}