Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp528774imm; Wed, 20 Jun 2018 02:19:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIs5W/xbuLf58ZDyZTVGmES88l1u4Y+Oh6HIDwxjERIe33+sRlCL6FeDHOZh8uWBsOgoGT6 X-Received: by 2002:a17:902:1025:: with SMTP id b34-v6mr2139185pla.112.1529486350969; Wed, 20 Jun 2018 02:19:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529486350; cv=none; d=google.com; s=arc-20160816; b=Bn53aSiZeLbACDLjsHmNwYWkwehYC/nU0k/BibwmWb3oQM/35CjxZr3NnmsPzDKJcY dOwFqEnXyS7KgYxd9XvKuOuS992+JGwwR+3Q3xKrxBCGWgQFHvQugKehILVSIsnEsOSw KWUVxcli0zlHUVJi98uLwTt3UUJk6yCm47Vldbr0jKnv1O/dPee0Mx6Pm8EBDy1fApLQ 3WYKOeR7C/1ZoLUqI8UEtsTB0YWkXL65ogQqYDUrGNRyVbwvS+oW2cmErWTCvoENZNmR U/N+8C4/aQx+ceKLJ4gWJSCPzaGR3KvjNqTq35GHNjAgbKfSABW7yzmrQtMoP8gJo/+R flQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=eMR7ibTmNe3ELDK64esigCjsQC4vZ1gIcPqREVgCnZk=; b=tYY6buyWda8oVB6EDClif6D2XInhlwhRVi497cEJFNH40Anj3vC+rUzVksBm54wyJX 1ngSUBeRiK4Ud5yvcflm8x45iPNq3W1FpaYPYfpd77vcxlnJtrx/GKeLfgWckFYr3ltX EL8JIuaSGoaF5FFjpjObjUs2g8sVvaeqnVl/jWAb+qQkWPsXr95Vuhm535Pnf6gqwbp6 1zAiycNKcY2qQztPMaYDF52GBGIiprEim6itg8W9BGWuOsRpRAGRSiDTbHGwYWerf2fG 7qxcVs4kWbfbMxnt7FQDnYUq8kHdcWxWjWYyQ1+vph3xd1AKTcIGv79BpvxKTkpDDHNO ciMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=AEqU61ph; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3-v6si2009709plt.71.2018.06.20.02.18.56; Wed, 20 Jun 2018 02:19:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=AEqU61ph; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754779AbeFTJSQ (ORCPT + 99 others); Wed, 20 Jun 2018 05:18:16 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60474 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753594AbeFTJR7 (ORCPT ); Wed, 20 Jun 2018 05:17:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=eMR7ibTmNe3ELDK64esigCjsQC4vZ1gIcPqREVgCnZk=; b=AEqU61ph9g6gnWPKf+wdsQvn2 72+NWq3ih/NAd75Bpruke9Ker9fOHNJOgAoXn0pLTC1qEGMJEtNcrWGEJSRIeJITCCUenAwbucHpB Qs3OP4zA7KyXkHSdtsisJbGOt2Rew3WDjYKX/xd4oTpfngIIZka8ynpL7CvDsK85RZ11GSaOkfzxw q1INf38HksTau737ccrhVORjIJvXOHD/dP2t0jBAk3Lq+ww/kNi0qKWmL5bN4P5tDP8H8J/Yure+j UHEpqb0EQTEj0aw0+NcNVgfJar53RssQ4im5mYMz8sjBjofuMz+WuBeuiet9szkU9XodCZLNoUXb2 tMdsd7t1A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVZFR-00007G-Tu; Wed, 20 Jun 2018 09:17:54 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 496122029F1DD; Wed, 20 Jun 2018 11:17:52 +0200 (CEST) Date: Wed, 20 Jun 2018 11:17:52 +0200 From: Peter Zijlstra To: Waiman Long Cc: Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, Davidlohr Bueso , Dan Williams , Arnd Bergmann , linux-nfs@vger.kernel.org Subject: Re: [PATCH] locking/rwsem: Fix up_read_non_owner() warning with DEBUG_RWSEMS Message-ID: <20180620091752.GL2476@hirez.programming.kicks-ass.net> References: <1527168398-4291-1-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1527168398-4291-1-git-send-email-longman@redhat.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 24, 2018 at 09:26:38AM -0400, Waiman Long wrote: > It was found that the use of up_read_non_owner() in NFS was causing > the following warning when DEBUG_RWSEMS was configured. > > DEBUG_LOCKS_WARN_ON(sem->owner != ((struct task_struct *)(1UL << 0))) > > Looking into the rwsem.c file, it was discovered that the corresponding > down_read_non_owner() function was not setting the owner field properly. > This is fixed now, and the warning should be gone. > > Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) > --- > kernel/locking/rwsem.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c > index bc1e507..776308d 100644 > --- a/kernel/locking/rwsem.c > +++ b/kernel/locking/rwsem.c > @@ -181,6 +181,7 @@ void down_read_non_owner(struct rw_semaphore *sem) > might_sleep(); > > __down_read(sem); > + rwsem_set_reader_owned(sem); > } > > EXPORT_SYMBOL(down_read_non_owner); > -- > 1.8.3.1 >