ACK: [PATCH Vivid SRU] ipmi/powernv: Fix minor locking bug

Brad Figg brad.figg at canonical.com
Mon Sep 14 14:30:26 UTC 2015


On Tue, Sep 08, 2015 at 10:43:05AM -0600, tim.gardner at canonical.com wrote:
> From: Alistair Popple <alistair at popple.id.au>
> 
> BugLink: http://bugs.launchpad.net/bugs/1493017
> 
> 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 at popple.id.au>
> Signed-off-by: Corey Minyard <cminyard at mvista.com>
> (cherry picked from commit ad1ed2a9dd4c435d6a3ce470211db9a8d107c3e0)
> Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
> ---
>  drivers/char/ipmi/ipmi_powernv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> 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;
>  	}
> -- 
> 1.9.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team


-- 
Brad Figg brad.figg at canonical.com http://www.canonical.com




More information about the kernel-team mailing list