diff options
author | Corey Minyard <cminyard@mvista.com> | 2017-06-30 08:18:08 -0400 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2017-06-30 08:18:08 -0400 |
commit | 4495ec6d770e1bca7a04e93ac453ab6720c56c5d (patch) | |
tree | ac17ad2bded1808cc9a5eed5680b5266b8f7d54d | |
parent | 1e7a75f74a193f92eb9e5da20d1fb1b388241631 (diff) |
ipmi:ssif: Add missing unlock in error branch
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: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org # 3.19
Signed-off-by: Corey Minyard <cminyard@mvista.com>
-rw-r--r-- | drivers/char/ipmi/ipmi_ssif.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index 971ecda33657..0aea3bcb6158 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c | |||
@@ -766,6 +766,11 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result, | |||
766 | result, len, data[2]); | 766 | result, len, data[2]); |
767 | } else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 | 767 | } else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 |
768 | || data[1] != IPMI_GET_MSG_FLAGS_CMD) { | 768 | || data[1] != IPMI_GET_MSG_FLAGS_CMD) { |
769 | /* | ||
770 | * Don't abort here, maybe it was a queued | ||
771 | * response to a previous command. | ||
772 | */ | ||
773 | ipmi_ssif_unlock_cond(ssif_info, flags); | ||
769 | pr_warn(PFX "Invalid response getting flags: %x %x\n", | 774 | pr_warn(PFX "Invalid response getting flags: %x %x\n", |
770 | data[0], data[1]); | 775 | data[0], data[1]); |
771 | } else { | 776 | } else { |