Commit e7c96508 authored by Hironobu Ishii's avatar Hironobu Ishii Committed by Linus Torvalds

[PATCH] ipmi_msghandler: inconsistent spin_lock usage

I found an inconsistent spin_lock usage in ipmi_smi_msg_received.
Signed-off-by: default avatarHironobu Ishii <hishii@soft.fujitsu.com>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 67b10813
...@@ -2620,7 +2620,7 @@ void ipmi_smi_msg_received(ipmi_smi_t intf, ...@@ -2620,7 +2620,7 @@ void ipmi_smi_msg_received(ipmi_smi_t intf,
spin_lock_irqsave(&(intf->waiting_msgs_lock), flags); spin_lock_irqsave(&(intf->waiting_msgs_lock), flags);
if (!list_empty(&(intf->waiting_msgs))) { if (!list_empty(&(intf->waiting_msgs))) {
list_add_tail(&(msg->link), &(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; goto out_unlock;
} }
spin_unlock_irqrestore(&(intf->waiting_msgs_lock), flags); spin_unlock_irqrestore(&(intf->waiting_msgs_lock), flags);
...@@ -2629,9 +2629,9 @@ void ipmi_smi_msg_received(ipmi_smi_t intf, ...@@ -2629,9 +2629,9 @@ void ipmi_smi_msg_received(ipmi_smi_t intf,
if (rv > 0) { if (rv > 0) {
/* Could not handle the message now, just add it to a /* Could not handle the message now, just add it to a
list to handle later. */ 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)); 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) { } else if (rv == 0) {
ipmi_free_smi_msg(msg); ipmi_free_smi_msg(msg);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment