Re: [PATCH] protect remove_proc_entry



On Fri, 2005-12-30 at 13:55 -0800, Mitchell Blank Jr wrote:
> Steven Rostedt wrote:
> > I've added a global remove_proc_lock to protect this section of code. I
> > was going to add a lock to proc_dir_entry so that the locking is only
> > cut down to the same parent, but since this function is called so
> > infrequently, why waste more memory then is needed. One global lock
> > should not cause too much of a headache here.
>
> Are you sure that it's the only place where we need guard ->subdir? It
> looks like proc_lookup() and proc_readdir() use the BLK when walking that
> list, so probably the best fix would be to use that lock everywhere else
> ->subdir is touched

Perhaps this is a good candidate to have the BKL removed from this
protection and replaced with a spin lock or something else. If I
remember, I'll look into that further.

-- Steve


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



Relevant Pages

  • Re: [PATCH] protect remove_proc_entry
    ... >> cut down to the same parent, but since this function is called so ... why waste more memory then is needed. ... One global lock ...
    (Linux-Kernel)
  • Formal Mutex Semantics
    ... Here's some stuff I was doing a while back on defining thread semantics. ... Basically stores are visible or not visible. ... Lock actions have no observable actions. ... Memory barriers are just another ...
    (comp.programming.threads)
  • Re: Locking shared memory
    ... As I have said when I try to lock ... the second shared memory address via mlockit fails. ... in 32MB segments, ... I have looked at the man page for mlock on RHEL4. ...
    (RedHat)
  • Re: xchg & lock question
    ... the processor's LOCK signal is automatically ... All IA32 processors automatically lock memory referencing XCHG ... particular CPU when that CPU has the data item cached (specifically if ...
    (comp.lang.asm.x86)
  • Lock EVERYTHING (for testing) [was: Re: Scaling noise]
    ... Is there a way we could get gcc to wrap EVERY memory access with some ... lock applied, then we can print a warning with the line number or drop ... Perhaps an even better solution would be to run an emulator. ... One problem is that we need to have metadata about memory accesses so we ...
    (Linux-Kernel)