diff mbox

rtc: at91rm9200: double locking bug in at91_rtc_interrupt()

Message ID 1426606690-18947-1-git-send-email-nicolas.ferre@atmel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nicolas Ferre March 17, 2015, 3:38 p.m. UTC
From: Dan Carpenter <dan.carpenter@oracle.com>

There is a typo here so we deadlock.

Fixes: dd1f1f391dd7 ('rtc: at91rm9200: rework wakeup and interrupt handling')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reported-also-by: David Dueck <davidcdueck@googlemail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
Hi Andrew,

Can you please take care of this fix for 4.0?
If you fee that I'd better take it myself please tell me.

Thanks, bye.

 drivers/rtc/rtc-at91rm9200.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dan Carpenter March 17, 2015, 5:32 p.m. UTC | #1
On Tue, Mar 17, 2015 at 04:38:10PM +0100, Nicolas Ferre wrote:
> Reported-also-by: David Dueck <davidcdueck@googlemail.com>

The point of tags is that you collect them by doing:
`git log | grep Reported-by: | sort | uniq -c | sort -rn` to see if you
are the winner.  It gives me an unfair advantage if you get creative
with David's tag.

regards,
dan carpenter
Rafael J. Wysocki March 18, 2015, 1:20 a.m. UTC | #2
On Tuesday, March 17, 2015 04:38:10 PM Nicolas Ferre wrote:
> From: Dan Carpenter <dan.carpenter@oracle.com>
> 
> There is a typo here so we deadlock.
> 
> Fixes: dd1f1f391dd7 ('rtc: at91rm9200: rework wakeup and interrupt handling')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Reported-also-by: David Dueck <davidcdueck@googlemail.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> Hi Andrew,
> 
> Can you please take care of this fix for 4.0?
> If you fee that I'd better take it myself please tell me.

The commit being fixed went in through my tree, so I'll take this one if that's
not a problem.

>  drivers/rtc/rtc-at91rm9200.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
> index b4f7744f6751..b283a1a573b3 100644
> --- a/drivers/rtc/rtc-at91rm9200.c
> +++ b/drivers/rtc/rtc-at91rm9200.c
> @@ -324,7 +324,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id)
>  
>  		ret = IRQ_HANDLED;
>  	}
> -	spin_lock(&suspended_lock);
> +	spin_unlock(&suspended_lock);
>  
>  	return ret;
>  }
>
diff mbox

Patch

diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index b4f7744f6751..b283a1a573b3 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -324,7 +324,7 @@  static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id)
 
 		ret = IRQ_HANDLED;
 	}
-	spin_lock(&suspended_lock);
+	spin_unlock(&suspended_lock);
 
 	return ret;
 }