Commit 04e006a8 authored by Corey Minyard's avatar Corey Minyard Committed by Sasha Levin

ipmi:ssif: Add missing unlock in error branch

[ Upstream commit 4495ec6d ]

When getting flags, a response to a different message would
result in a deadlock because of a missing unlock.  Add that
unlock and a comment.  Found by static analysis.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org # 3.19
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 25ff8cb0
...@@ -757,6 +757,11 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result, ...@@ -757,6 +757,11 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
result, len, data[2]); result, len, data[2]);
} else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 } else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2
|| data[1] != IPMI_GET_MSG_FLAGS_CMD) { || data[1] != IPMI_GET_MSG_FLAGS_CMD) {
/*
* Don't abort here, maybe it was a queued
* response to a previous command.
*/
ipmi_ssif_unlock_cond(ssif_info, flags);
pr_warn(PFX "Invalid response getting flags: %x %x\n", pr_warn(PFX "Invalid response getting flags: %x %x\n",
data[0], data[1]); data[0], data[1]);
} else { } else {
......
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