From: Alistair Popple Date: Fri, 10 Apr 2015 07:32:20 +0000 (+1000) Subject: ipmi/powernv: Fix minor locking bug X-Git-Tag: firefly_0821_release~176^2~2044^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ad1ed2a9dd4c435d6a3ce470211db9a8d107c3e0;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Corey Minyard --- diff --git a/drivers/char/ipmi/ipmi_powernv.c b/drivers/char/ipmi/ipmi_powernv.c index 79524ed2a3cb..8753b0f6a317 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; }