All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Easton <kevin@guarana.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>, Qian Cai <cai@lca.pw>,
	linux-fsdevel@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: "fs/namei.c: keep track of nd->root refcount status" causes boot panic
Date: Thu, 5 Sep 2019 12:17:55 +0000	[thread overview]
Message-ID: <20190905121755.GA23258@ip-172-31-14-16> (raw)
In-Reply-To: <20190903175610.GM1131@ZenIV.linux.org.uk>

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

  parent reply	other threads:[~2019-09-05 12:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03  4:21 "fs/namei.c: keep track of nd->root refcount status" causes boot panic Qian Cai
2019-09-03  5:22 ` Dexuan-Linux Cui
2019-09-03  5:50   ` Dexuan Cui
2019-09-03  6:00     ` Dexuan Cui
2019-09-03  8:13 ` Naresh Kamboju
2019-09-03  9:08   ` Sachin Sant
2019-09-03 12:37 ` Al Viro
2019-09-03 13:04   ` Christoph Hellwig
2019-09-03 13:48     ` Al Viro
2019-09-03 13:50       ` Christoph Hellwig
2019-09-03 13:53         ` Al Viro
2019-09-03 15:39           ` Christoph Hellwig
2019-09-03 17:56             ` Al Viro
2019-09-04 12:39               ` Christoph Hellwig
2019-09-05  9:13                 ` Naresh Kamboju
2019-09-05 16:46                   ` Al Viro
2019-09-05 12:17               ` Kevin Easton [this message]
2019-09-03 21:30         ` Theodore Y. Ts'o
2019-09-03 13:31   ` Al Viro
2019-09-03 13:52     ` Naresh Kamboju

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=20190905121755.GA23258@ip-172-31-14-16 \
    --to=kevin@guarana.org \
    --cc=cai@lca.pw \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.