summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2015-04-10 17:32:20 +1000
committerCorey Minyard <cminyard@mvista.com>2015-04-10 20:51:42 -0500
commitad1ed2a9dd4c435d6a3ce470211db9a8d107c3e0 (patch)
tree1e19a70f5e7d15fab56ff7f1dfefa74817624ead /drivers/char
parent1e7d6a45f6b10bc48a1453bca3d829e210546571 (diff)
downloadop-kernel-dev-ad1ed2a9dd4c435d6a3ce470211db9a8d107c3e0.zip
op-kernel-dev-ad1ed2a9dd4c435d6a3ce470211db9a8d107c3e0.tar.gz
ipmi/powernv: Fix minor locking bug
If ipmi_powernv_recv(...) is called without a current message it prints a warning and returns. However it fails to release the message lock causing the system to dead lock during any subsequent IPMI operations. This error path should never normally be taken unless there are bugs elsewhere in the system. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_powernv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_powernv.c b/drivers/char/ipmi/ipmi_powernv.c
index 79524ed..8753b0f 100644
--- a/drivers/char/ipmi/ipmi_powernv.c
+++ b/drivers/char/ipmi/ipmi_powernv.c
@@ -125,6 +125,7 @@ static int ipmi_powernv_recv(struct ipmi_smi_powernv *smi)
spin_lock_irqsave(&smi->msg_lock, flags);
if (!smi->cur_msg) {
+ spin_unlock_irqrestore(&smi->msg_lock, flags);
pr_warn("no current message?\n");
return 0;
}
OpenPOWER on IntegriCloud