[lkml]   [2002]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Fix for duplicate /proc entries
On Tue, Feb 05, 2002 at 09:52:55PM -0600, Brent Cook wrote:

> I think that I have found a problem with proc_dir_entry(). It seems to
> allow multiple /proc entries to be created with the same name, without
> returning a NULL pointer. I asked the folks on #kernelnewbies, and they
> said that perhaps this is a feature. In either case, I believe that the
> following patch fixes the issue by checking if a proc entry already exists
> before creating it. This mirrors the behavior of remove_proc_entry, which
> checks for the presense of a proc entry before deleting it.

The only instance I've seen of this happen is the acpi code.
Whilst the patch is good in the sense that it allows things like
/proc/acpi/button to become usable, the correct fix would be
to fix ACPI.

Maybe printk'ing a "tried to create duplicate xxx proc entry"
would be useful, so we at least don't paper over problems and
make them harder to find later.

| Dave Jones.
| SuSE Labs
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:18    [W:0.256 / U:9.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site