* Re: proc: more debugging for "already registered" case
[not found] <200809132159.m8DLx2sN023436@hera.kernel.org>
@ 2008-09-14 2:54 ` Arjan van de Ven
0 siblings, 0 replies; only message in thread
From: Arjan van de Ven @ 2008-09-14 2:54 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Alexey Dobriyan, Linus Torvalds
On Sat, 13 Sep 2008 21:59:02 GMT
Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:
> Gitweb:
> http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=665020c35e89a9e0643e21561e4f8f967f4f2c4b
> Commit: 665020c35e89a9e0643e21561e4f8f967f4f2c4b Parent:
> a551b98d5f6fce5897d497abd8bfb262efb33d2a Author: Alexey Dobriyan
> <adobriyan@gmail.com> AuthorDate: Sat Sep 13 02:33:06 2008 -0700
> Committer: Linus Torvalds <torvalds@linux-foundation.org>
> CommitDate: Sat Sep 13 14:41:50 2008 -0700
> if (strcmp(tmp->name, dp->name) == 0) {
> - printk(KERN_WARNING "proc_dir_entry '%s'
> already "
> - "registered\n", dp->name);
> + printk(KERN_WARNING "proc_dir_entry '%s/%s'
> already registered\n",
> + dir->name, dp->name);
> dump_stack();
> break;
Hi Linus, Alexey,
when doing this change, might as well turn it into a WARN() instead;
that way kerneloops.org can collect these, and in addition, it uses then
a more standard form of reporting (including filename/line number etc)
so how about this:
>From 7b907eb010b308c1a41871ea1b6ffb79d2538f01 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Sat, 13 Sep 2008 19:51:30 -0700
Subject: [PATCH] procfs: use WARN() rather than printk+backtrace
Use WARN() rather than a printk() + backtrace();
this gives a more standard format message as well as complete
information (including line numbers etc) that will be collected
by kerneloops.org
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
fs/proc/generic.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 7821589..60a359b 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -547,9 +547,8 @@ static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp
for (tmp = dir->subdir; tmp; tmp = tmp->next)
if (strcmp(tmp->name, dp->name) == 0) {
- printk(KERN_WARNING "proc_dir_entry '%s/%s' already registered\n",
+ WARN(1, KERN_WARNING "proc_dir_entry '%s/%s' already registered\n",
dir->name, dp->name);
- dump_stack();
break;
}
--
1.5.5.1
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-09-14 2:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200809132159.m8DLx2sN023436@hera.kernel.org>
2008-09-14 2:54 ` proc: more debugging for "already registered" case Arjan van de Ven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®