Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp830150ybe; Thu, 5 Sep 2019 06:37:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzR53asEGvzEWvhhaot/lwOKpOTsd9yOwSbpSrmSbx6sGLURl+mjd0NwQiv4S3phB241SWa X-Received: by 2002:a17:90a:a414:: with SMTP id y20mr3912458pjp.64.1567690629102; Thu, 05 Sep 2019 06:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567690629; cv=none; d=google.com; s=arc-20160816; b=msEx51JmgacZB1xTG0CRMyUaqMX/dmc6Kk2la2khr8k2m4c7lu0JAL2rSzuG7U6tfs Z6EjZpmkCXBYWG0ti5L6xor7S/6sOSYOGaEFcv7kcTysQ5RZIyNtlqTCfZvOkb7hg6zM U/Z7vMU5MeM5jpc5L3XrIWCJ31JFJi398M5jhsS5MkTnzeO5Ys+h9uBN0mHzskNdz9Zn tMuVNlhzL2lHvrswDLtf/coqJ3LlwYvIOyJUBvso69F5dD0LYHCtXNXi2jJuOYfnydE4 dxmdmrp3FCjnRaEUh/zsoRV2pRmDpmVgGAuNFvkbLqBEkjzxFr+dbOEYBNB3JzyqsILV OrGg== 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; bh=Or8kdVri2BPtGdfZjDznFNASuS9nvEw58o+anrTyUhU=; b=mjJ1CUwZTQv5IGWchSQBSaLP1TUgGQifJeLJ6dR8qBrYudX0A4FpblvYEOnXJApRE2 SIVrMNBehmKumc01lJNiZ0dRg8U7UqZIFu+mDhtXHxJfQGHLBdv6xJkSq0Y0y01frpKC lQajpkNJKvajMRZgQpIwMpqjkpv442mz3qJq5rGFAZKG+V1wBpg5EW8YsgjpyNU4Mlg5 cPL+1KFWCKZfStuQiRRZwR7ykXNPjevqGS37sgjPQDACDEkUT1LEtECncY/owL/oSVho +ANIZn8oYR1iCL1UGfIXj8lMTFH3tfBSxITrOMOgCliTQNw+viqnjIyClAZIdCTimuJf 2oIg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i71si2113357pje.34.2019.09.05.06.36.51; Thu, 05 Sep 2019 06:37:09 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389356AbfIEM1R (ORCPT + 99 others); Thu, 5 Sep 2019 08:27:17 -0400 Received: from aws.guarana.org ([13.237.110.252]:58206 "EHLO aws.guarana.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387820AbfIEM1Q (ORCPT ); Thu, 5 Sep 2019 08:27:16 -0400 X-Greylist: delayed 556 seconds by postgrey-1.27 at vger.kernel.org; Thu, 05 Sep 2019 08:27:15 EDT Received: by aws.guarana.org (Postfix, from userid 1006) id DCE0CBBED4; Thu, 5 Sep 2019 12:17:55 +0000 (UTC) Date: Thu, 5 Sep 2019 12:17:55 +0000 From: Kevin Easton To: Al Viro Cc: Christoph Hellwig , Qian Cai , linux-fsdevel@vger.kernel.org, LKML , Linus Torvalds Subject: Re: "fs/namei.c: keep track of nd->root refcount status" causes boot panic Message-ID: <20190905121755.GA23258@ip-172-31-14-16> References: <7C6CCE98-1E22-433C-BF70-A3CBCDED4635@lca.pw> <20190903123719.GF1131@ZenIV.linux.org.uk> <20190903130456.GA9567@infradead.org> <20190903134832.GH1131@ZenIV.linux.org.uk> <20190903135024.GA8274@infradead.org> <20190903135354.GI1131@ZenIV.linux.org.uk> <20190903153930.GA2791@infradead.org> <20190903175610.GM1131@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190903175610.GM1131@ZenIV.linux.org.uk> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 03, 2019 at 06:56:10PM +0100, Al Viro wrote: > On Tue, Sep 03, 2019 at 08:39:30AM -0700, Christoph Hellwig wrote: > > > > There's much nastier situation than "new upstream kernel released, > > > need to rebuild" - it's bisect in mainline trying to locate something... > > > > I really don't get the point. And it's not like we've card about > > this anywhere else. And jumping wildly around with the numeric values > > for constants will lead to bugs like the one you added and fixed again > > and again. > > The thing is, there are several groups - it's not as if all additions > were guaranteed to be at the end. So either we play with renumbering > again and again, or we are back to the square one... > > Is there any common trick that would allow to verify the lack of duplicates > at the build time? What about: static_assert( (LOOKUP_FOLLOW^LOOKUP_DIRECTORY^LOOKUP_AUTOMOUNT^LOOKUP_EMPTY^LOOKUP_DOWN^ LOOKUP_REVAL^LOOKUP_RCU^ LOOKUP_OPEN^LOOKUP_CREATE^LOOKUP_EXCL^LOOKUP_RENAME_TARGET^ LOOKUP_PARENT^LOOKUP_NO_REVAL^LOOKUP_JUMPED^LOOKUP_ROOT^LOOKUP_ROOT_GRABBED) == (LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_AUTOMOUNT|LOOKUP_EMPTY|LOOKUP_DOWN| LOOKUP_REVAL|LOOKUP_RCU| LOOKUP_OPEN|LOOKUP_CREATE|LOOKUP_EXCL|LOOKUP_RENAME_TARGET| LOOKUP_PARENT|LOOKUP_NO_REVAL|LOOKUP_JUMPED|LOOKUP_ROOT|LOOKUP_ROOT_GRABBED) , "duplicated LOOKUP_* constant"); ? - Kevin