kernel-ark/fs/proc
Steven Rostedt 64a07bd82e [PATCH] protect remove_proc_entry
It has been discovered that the remove_proc_entry has a race in the removing
of entries in the proc file system that are siblings.  There's no protection
around the traversing and removing of elements that belong in the same
subdirectory.

This subdirectory list is protected in other areas by the BKL.  So the BKL was
at first used to protect this area too, but unfortunately, remove_proc_entry
may be called with spinlocks held.  The BKL may schedule, so this was not a
solution.

The final solution was to add a new global spin lock to protect this list,
called proc_subdir_lock.  This lock now protects the list in
remove_proc_entry, and I also went around looking for other areas that this
list is modified and added this protection there too.  Care must be taken
since these locations call several functions that may also schedule.

Since I don't see any location that these functions that modify the
subdirectory list are called by interrupts, the irqsave/restore versions of
the spin lock was _not_ used.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-26 08:56:53 -08:00
..
array.c
base.c
generic.c [PATCH] protect remove_proc_entry 2006-03-26 08:56:53 -08:00
inode-alloc.txt
inode.c [PATCH] cpuset memory spread: slab cache format 2006-03-24 07:33:23 -08:00
internal.h
kcore.c
kmsg.c
Makefile
mmu.c
nommu.c
proc_devtree.c [PATCH] protect remove_proc_entry 2006-03-26 08:56:53 -08:00
proc_misc.c [PATCH] slab: implement /proc/slab_allocators 2006-03-25 08:22:49 -08:00
proc_tty.c
root.c
task_mmu.c
task_nommu.c
vmcore.c