Skip to content

Commit fa696ee

Browse files
cminyardgregkh
authored andcommitted
ipmi:ssif: Add missing unlock in error branch
commit 4495ec6d770e1bca7a04e93ac453ab6720c56c5d 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>
1 parent 8878c53 commit fa696ee

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/char/ipmi/ipmi_ssif.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,11 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
758758
result, len, data[2]);
759759
} else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2
760760
|| data[1] != IPMI_GET_MSG_FLAGS_CMD) {
761+
/*
762+
* Don't abort here, maybe it was a queued
763+
* response to a previous command.
764+
*/
765+
ipmi_ssif_unlock_cond(ssif_info, flags);
761766
pr_warn(PFX "Invalid response getting flags: %x %x\n",
762767
data[0], data[1]);
763768
} else {

0 commit comments

Comments
 (0)