stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "ipmi:ssif: Add missing unlock in error branch" has been added to the 4.4-stable tree
@ 2017-07-25  1:42 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-25  1:42 UTC (permalink / raw)
  To: cminyard, dan.carpenter, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    ipmi:ssif: Add missing unlock in error branch

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ipmi-ssif-add-missing-unlock-in-error-branch.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 4495ec6d770e1bca7a04e93ac453ab6720c56c5d Mon Sep 17 00:00:00 2001
From: Corey Minyard <cminyard@mvista.com>
Date: Fri, 30 Jun 2017 07:18:08 -0500
Subject: ipmi:ssif: Add missing unlock in error branch

From: Corey Minyard <cminyard@mvista.com>

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>

---
 drivers/char/ipmi/ipmi_ssif.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -758,6 +758,11 @@ static void msg_done_handler(struct ssif
 			       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 {


Patches currently in stable-queue which might be from cminyard@mvista.com are

queue-4.4/ipmi-ssif-add-missing-unlock-in-error-branch.patch
queue-4.4/ipmi-use-rcu-lock-around-call-to-intf-handlers-sender.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-25  1:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25  1:42 Patch "ipmi:ssif: Add missing unlock in error branch" has been added to the 4.4-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).