Re: proc: more debugging for "already registered" case

From: Arjan van de Ven
Date: Sat Sep 13 2008 - 22:57:30 EST


On Sat, 13 Sep 2008 21:59:02 GMT
Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx> 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@xxxxxxxxx> AuthorDate: Sat Sep 13 02:33:06 2008 -0700
> Committer: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> 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: