Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp72721imm; Tue, 19 Jun 2018 16:11:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLHHG5Av5+rTv9MODDlMsVrWLTvktZXpTad4VtJNOhwa79b5VXSLwxC3R9t9L06RjKfphge X-Received: by 2002:a62:449b:: with SMTP id m27-v6mr20244423pfi.130.1529449878164; Tue, 19 Jun 2018 16:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529449878; cv=none; d=google.com; s=arc-20160816; b=yXonQx9EQgW8xHeaKU1m8q+gbM9bL+2/HOZIk07pGLD2grQcYglLBg6jYnDRVi1jcX +/SQj3Pyfa8vMnCmmVB+HZb8whxdThL5tENWPcfNGL64fudEe6d80NO3iJGSqPu9mzI+ e8H8PNeDInlY2QCRuMr8I04XoW+e7n4WwpEExhQEhHgUVWwLVmLsi5O6kBHvO8uipzbX BZiTA9thuURF8BmxUK4NhSJQOZSqiquJ/xBwAqpqa+4ntnexaGe78qNSNCIakN6xDp7g afmDhtLVZBhF4V139ANuokJFvsYJNZVVG8MUX/6LmPg/GSrWPCIQuCIm7tHnfVZTjBrJ +p6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=J9ChnDR2og9Im8ICt1gSe4z8ybBWR/JLgEMFpYoEVsI=; b=IH1qjVICGC7Zf6HpGZClvgq16ekKXPpeDTtKtLnxrA0ZqygNAIVLPBoP1WJ2wliihB aH0M8jCddOLS2W6ElPUQsi/5JVI7EBkW7kijNtUViVYFHziGvWaK3O70CcH0nDUAb+/A M8Df8INJC3ABHg9QYVz5taEAa9bPa0DreUz/BmOT8XIP6cx443w8JovoqJdOmLR0yyX/ QQcihaJuGe5LIjcauTjDmIikPW7Cn7nTCem/LdvID83iyaPJEDOJYrXH5tZ+9Eiutcr0 mZ5tX0h4KkD1pN63agU4IPRkjODgTZagg26N8sjxDG3xkrX3T08mNNjAQXTTXnhsZWYu 0Dtg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6-v6si662344pgd.579.2018.06.19.16.11.04; Tue, 19 Jun 2018 16:11:18 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752807AbeFSXJ7 (ORCPT + 99 others); Tue, 19 Jun 2018 19:09:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45260 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751629AbeFSXJ6 (ORCPT ); Tue, 19 Jun 2018 19:09:58 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 211A13082A4F; Tue, 19 Jun 2018 23:09:58 +0000 (UTC) Received: from llong.remote.csb (ovpn-116-34.phx2.redhat.com [10.3.116.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id E50575C89A; Tue, 19 Jun 2018 23:09:55 +0000 (UTC) Subject: Re: [PATCH] locking/rwsem: Fix up_read_non_owner() warning with DEBUG_RWSEMS To: Ingo Molnar , Peter Zijlstra , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, Davidlohr Bueso , Dan Williams , Arnd Bergmann , linux-nfs@vger.kernel.org, =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= References: <1527168398-4291-1-git-send-email-longman@redhat.com> From: Waiman Long Organization: Red Hat Message-ID: Date: Wed, 20 Jun 2018 07:09:54 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <1527168398-4291-1-git-send-email-longman@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 19 Jun 2018 23:09:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/24/2018 09:26 PM, 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 > --- > 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(); > tch > __down_read(sem); > + rwsem_set_reader_owned(sem); > } > > EXPORT_SYMBOL(down_read_non_owner); Since the 4.18 merge window has been closed. Can that patch be merged upstream? Cheers, Longman