public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Alexey Kodanev <alexey.kodanev@oracle.com>
Cc: josh@joshtriplett.org, linux-kernel@vger.kernel.org,
	vasily.isaenko@oracle.com, dave@stgolabs.net
Subject: Re: [PATCH] kernel/locking/locktorture: fix deadlock in 'rw_lock_irq' type
Date: Fri, 6 Mar 2015 16:37:42 -0800	[thread overview]
Message-ID: <20150307003742.GH5236@linux.vnet.ibm.com> (raw)
In-Reply-To: <1425686813-24029-1-git-send-email-alexey.kodanev@oracle.com>

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
> 


  reply	other threads:[~2015-03-07  0:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-03-07  1:03   ` Davidlohr Bueso
2015-03-07  1:30     ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150307003742.GH5236@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=alexey.kodanev@oracle.com \
    --cc=dave@stgolabs.net \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vasily.isaenko@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox