public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel/locking/locktorture: fix deadlock in 'rw_lock_irq' type
@ 2015-03-07  0:06 Alexey Kodanev
  2015-03-07  0:37 ` Paul E. McKenney
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Kodanev @ 2015-03-07  0:06 UTC (permalink / raw)
  To: paulmck; +Cc: josh, linux-kernel, vasily.isaenko, Alexey Kodanev

torture_rwlock_read_unlock_irq() must use read_unlock_irqrestore()
instead of write_unlock_irqrestore().

Use read_unlock_irqrestore() instead of write_unlock_irqrestore().

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
 kernel/locking/locktorture.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
index ec8cce2..6a2723c 100644
--- a/kernel/locking/locktorture.c
+++ b/kernel/locking/locktorture.c
@@ -309,7 +309,7 @@ static int torture_rwlock_read_lock_irq(void) __acquires(torture_rwlock)
 static void torture_rwlock_read_unlock_irq(void)
 __releases(torture_rwlock)
 {
-	write_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags);
+	read_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags);
 }
 
 static struct lock_torture_ops rw_lock_irq_ops = {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] kernel/locking/locktorture: fix deadlock in 'rw_lock_irq' type
  2015-03-07  0:06 [PATCH] kernel/locking/locktorture: fix deadlock in 'rw_lock_irq' type Alexey Kodanev
@ 2015-03-07  0:37 ` Paul E. McKenney
  2015-03-07  1:03   ` Davidlohr Bueso
  0 siblings, 1 reply; 4+ messages in thread
From: Paul E. McKenney @ 2015-03-07  0:37 UTC (permalink / raw)
  To: Alexey Kodanev; +Cc: josh, linux-kernel, vasily.isaenko, dave

On Sat, Mar 07, 2015 at 03:06:53AM +0300, Alexey Kodanev wrote:
> torture_rwlock_read_unlock_irq() must use read_unlock_irqrestore()
> instead of write_unlock_irqrestore().
> 
> Use read_unlock_irqrestore() instead of write_unlock_irqrestore().
> 
> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>

Good catch!  If Davidlohr has no objections, I will queue this one.

							Thanx, Paul

> ---
>  kernel/locking/locktorture.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
> index ec8cce2..6a2723c 100644
> --- a/kernel/locking/locktorture.c
> +++ b/kernel/locking/locktorture.c
> @@ -309,7 +309,7 @@ static int torture_rwlock_read_lock_irq(void) __acquires(torture_rwlock)
>  static void torture_rwlock_read_unlock_irq(void)
>  __releases(torture_rwlock)
>  {
> -	write_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags);
> +	read_unlock_irqrestore(&torture_rwlock, cxt.cur_ops->flags);
>  }
> 
>  static struct lock_torture_ops rw_lock_irq_ops = {
> -- 
> 1.7.1
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kernel/locking/locktorture: fix deadlock in 'rw_lock_irq' type
  2015-03-07  0:37 ` Paul E. McKenney
@ 2015-03-07  1:03   ` Davidlohr Bueso
  2015-03-07  1:30     ` Paul E. McKenney
  0 siblings, 1 reply; 4+ messages in thread
From: Davidlohr Bueso @ 2015-03-07  1:03 UTC (permalink / raw)
  To: paulmck; +Cc: Alexey Kodanev, josh, linux-kernel, vasily.isaenko

On Fri, 2015-03-06 at 16:37 -0800, Paul E. McKenney wrote:
> On Sat, Mar 07, 2015 at 03:06:53AM +0300, Alexey Kodanev wrote:
> > torture_rwlock_read_unlock_irq() must use read_unlock_irqrestore()
> > instead of write_unlock_irqrestore().
> > 
> > Use read_unlock_irqrestore() instead of write_unlock_irqrestore().
> > 
> > Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
> 
> Good catch!  If Davidlohr has no objections, I will queue this one.

Dear me, yes that looks completely borken. Thanks for the fix.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kernel/locking/locktorture: fix deadlock in 'rw_lock_irq' type
  2015-03-07  1:03   ` Davidlohr Bueso
@ 2015-03-07  1:30     ` Paul E. McKenney
  0 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2015-03-07  1:30 UTC (permalink / raw)
  To: Davidlohr Bueso; +Cc: Alexey Kodanev, josh, linux-kernel, vasily.isaenko

On Fri, Mar 06, 2015 at 05:03:00PM -0800, Davidlohr Bueso wrote:
> On Fri, 2015-03-06 at 16:37 -0800, Paul E. McKenney wrote:
> > On Sat, Mar 07, 2015 at 03:06:53AM +0300, Alexey Kodanev wrote:
> > > torture_rwlock_read_unlock_irq() must use read_unlock_irqrestore()
> > > instead of write_unlock_irqrestore().
> > > 
> > > Use read_unlock_irqrestore() instead of write_unlock_irqrestore().
> > > 
> > > Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
> > 
> > Good catch!  If Davidlohr has no objections, I will queue this one.
> 
> Dear me, yes that looks completely borken. Thanks for the fix.

Queued for v4.2.  (If this is more urgent than that, please let me know.)

							Thanx, Paul


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-07  1:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-07  0:06 [PATCH] kernel/locking/locktorture: fix deadlock in 'rw_lock_irq' type Alexey Kodanev
2015-03-07  0:37 ` Paul E. McKenney
2015-03-07  1:03   ` Davidlohr Bueso
2015-03-07  1:30     ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox