Re: Fix for duplicate /proc entries

From: Alexander Viro (viro@math.psu.edu)
Date: Fri Feb 08 2002 - 12:54:00 EST


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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 15 2002 - 21:00:19 EST