From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756236AbbCGAhv (ORCPT ); Fri, 6 Mar 2015 19:37:51 -0500 Received: from e36.co.us.ibm.com ([32.97.110.154]:58727 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751371AbbCGAhs (ORCPT ); Fri, 6 Mar 2015 19:37:48 -0500 Date: Fri, 6 Mar 2015 16:37:42 -0800 From: "Paul E. McKenney" To: Alexey Kodanev 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 Message-ID: <20150307003742.GH5236@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <1425686813-24029-1-git-send-email-alexey.kodanev@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425686813-24029-1-git-send-email-alexey.kodanev@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15030700-0021-0000-0000-0000091213D4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 >