All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Paul Menage" <menage@google.com>
Cc: viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add a refcount check in dput()
Date: Mon, 17 Sep 2007 13:48:35 -0700	[thread overview]
Message-ID: <20070917134835.88c8f470.akpm@linux-foundation.org> (raw)
In-Reply-To: <6599ad830709171121r1ded056j7dc676bb6f37e231@mail.gmail.com>

On Mon, 17 Sep 2007 11:21:35 -0700
"Paul Menage" <menage@google.com> wrote:

> On 9/15/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> > >
> > > +     BUG_ON(!atomic_read(&dentry->d_count));
> > >  repeat:
> > >       if (atomic_read(&dentry->d_count) == 1)
> > >               might_sleep();
> >
> > eek, much too aggressive.
> 
> How about the equivalent BUG_ON() in dget()? I figure that they ought
> to both be of the same strictness.

The one in dget() is known not to trigger - it's been there for a long time.

My problem with new BUG_ON's is that they get added thinking "no way will
this trigger" and lo, they do trigger and lots of people get their testing
disrupted for a whole release.



Long-standing checks like the one in dget() should perhaps be removed now
that we know they don't trigger - move them under some CONFIG_DEBUG_foo
option.

      reply	other threads:[~2007-09-17 20:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-10 22:13 [PATCH] Add a refcount check in dput() Paul Menage
2007-09-15  8:39 ` Andrew Morton
2007-09-17 18:21   ` Paul Menage
2007-09-17 20:48     ` Andrew Morton [this message]

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=20070917134835.88c8f470.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --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.