ipmi:ssif: Add missing unlock in error branch
commit 4495ec6d77 upstream.
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>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8878c53244
commit
fa696eea4d
1 changed files with 5 additions and 0 deletions
|
|
@ -758,6 +758,11 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
|||
result, len, data[2]);
|
||||
} else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2
|
||||
|| 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",
|
||||
data[0], data[1]);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue