From: Andrew Morton <akpm@linux-foundation.org>
To: Alexey Dobriyan <adobriyan@sw.ru>
Cc: linux-kernel@vger.kernel.org, devel@openvz.org
Subject: Re: [PATCH] proc: use BUG_ON() in de_put()
Date: Fri, 16 Nov 2007 13:46:42 -0800 [thread overview]
Message-ID: <20071116134642.2dda1600.akpm@linux-foundation.org> (raw)
In-Reply-To: <20071115161249.GE6216@localhost.sw.ru>
On Thu, 15 Nov 2007 19:12:49 +0300
Alexey Dobriyan <adobriyan@sw.ru> wrote:
> It's much more visible that some printk. I still has an unexplained oops
> in proc, so let's leave it for a while.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
> ---
>
> fs/proc/inode.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> --- a/fs/proc/inode.c
> +++ b/fs/proc/inode.c
> @@ -37,12 +37,7 @@ void de_put(struct proc_dir_entry *de)
> {
> if (de) {
> lock_kernel();
> - if (!atomic_read(&de->count)) {
> - printk("de_put: entry %s already free!\n", de->name);
> - unlock_kernel();
> - return;
> - }
> -
> + BUG_ON(atomic_read(&de->count) == 0);
> if (atomic_dec_and_test(&de->count)) {
> if (de->deleted) {
> printk("de_put: deferred delete of %s\n",
I don't see that an error in here _requires_ that we nuke the machine.
Surely we can emit a warning and then recover in some fashion?
next prev parent reply other threads:[~2007-11-16 21:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 16:12 [PATCH] proc: use BUG_ON() in de_put() Alexey Dobriyan
2007-11-16 21:46 ` Andrew Morton [this message]
2007-11-22 8:49 ` Alexey Dobriyan
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=20071116134642.2dda1600.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@sw.ru \
--cc=devel@openvz.org \
--cc=linux-kernel@vger.kernel.org \
/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.