Re: Fix for duplicate /proc entries

Alexander Viro
2002-02-08T17:54:34Z

On Fri, 8 Feb 2002, Mike Fedyk wrote:

> On Fri, Feb 08, 2002 at 10:13:26AM -0600, Brent Cook wrote:
> > Maybe, someday there will be some sort of DEBUG flag to set in the kernel,
> > from which a slew of asserts and printk's will spring to life, pointing
> > out inconsistencies and bad assumptions. That is where this check would
> > probably work the best.
> >
>
> Actually, there are seperate debug config options for different subsystems,
> and I think that is good. The real problem is finding a way to add another
> debug config option for procfs without littering the code with ifdefs...

No point. Check that file already exist and BUG() if it does.
Unconditionally. There's no need to be nice to broken code and yes,
any code that tries to register existing procfs entry _is_ broken.
That was never supposed to work.