Skip to content

Commit

Permalink
ipmi/powernv: Fix minor locking bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alistair Popple authored and Corey Minyard committed Apr 11, 2015
1 parent 1e7d6a4 commit ad1ed2a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/char/ipmi/ipmi_powernv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ad1ed2a

Please sign in to comment.