linux-stable-rt/include/linux
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
..
amba
byteorder
dvb
hdlc
isdn
lockd
mmc
mtd
netfilter
netfilter_arp
netfilter_bridge
netfilter_ipv4
netfilter_ipv6
nfsd
raid [PATCH] DM: Fix bug: BIO_RW_BARRIER requests to md/raid1 hang. 2006-03-23 07:38:03 -08:00
spi
sunrpc Merge branch 'linus' 2006-03-23 23:44:19 -05:00
tc_act
tc_ematch
8250_pci.h
a.out.h
ac97_codec.h
acct.h
acpi.h
adb.h
adfs_fs.h
adfs_fs_i.h
adfs_fs_sb.h
affs_fs.h
affs_hardblocks.h
agp_backend.h
agpgart.h
aio.h
aio_abi.h
amifd.h
amifdreg.h
amigaffs.h
apm_bios.h
arcdevice.h
arcfb.h
ata.h
atalk.h
atm.h
atm_eni.h
atm_he.h
atm_idt77105.h
atm_nicstar.h
atm_suni.h
atm_tcp.h
atm_zatm.h
atmapi.h
atmarp.h
atmbr2684.h
atmclip.h
atmdev.h
atmioc.h
atmlec.h
atmmpc.h
atmppp.h
atmsap.h
atmsvc.h
attribute_container.h
audit.h
auto_fs.h
auto_fs4.h
auxvec.h
awe_voice.h
ax25.h
b1lli.h
b1pcmcia.h
backing-dev.h
backlight.h
baycom.h
bcd.h
bfs_fs.h
binfmts.h
bio.h
bit_spinlock.h
bitmap.h [PATCH] bitmap: region cleanup 2006-03-24 07:33:20 -08:00
bitops.h [PATCH] roundup_pow_of_two() 64-bit fix 2006-03-25 08:22:58 -08:00
blkdev.h [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
blkpg.h
blktrace_api.h [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
blockgroup_lock.h
bootmem.h [PATCH] x86_64: Try to allocate node memmap near the end of node 2006-03-25 09:10:56 -08:00
bpqether.h
buffer_head.h
cache.h [PATCH] Move read_mostly definition to asm/cache.h 2006-03-23 07:38:10 -08:00
calc64.h
capability.h [PATCH] refactor capable() to one implementation, add __capable() helper 2006-03-25 08:22:56 -08:00
capi.h
cciss_ioctl.h
cd1400.h
cdev.h
cdk.h
cdrom.h [PATCH] kill cdrom ->dev_ioctl method 2006-03-23 07:38:09 -08:00
chio.h
circ_buf.h
clk.h include/linux/clk.h is betraying its ARM origins 2006-03-25 18:15:24 +00:00
cm4000_cs.h
cn_proc.h
cobalt-nvram.h
coda.h
coda_cache.h
coda_fs_i.h
coda_linux.h
coda_proc.h
coda_psdev.h
coff.h
com20020.h
compat.h
compat_ioctl.h [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
compiler-gcc.h
compiler-gcc3.h
compiler-gcc4.h
compiler-intel.h
compiler.h
completion.h
comstats.h
concap.h
config.h
configfs.h
connector.h
console.h
console_struct.h
consolemap.h
cpu.h [PATCH] Check if cpu can be onlined before calling smp_prepare_cpu() 2006-03-25 08:23:01 -08:00
cpufreq.h
cpumask.h [PATCH] cpumask: uninline any_online_cpu() 2006-03-25 08:23:00 -08:00
cpuset.h [PATCH] cpuset memory spread basic implementation 2006-03-24 07:33:22 -08:00
cramfs_fs.h
cramfs_fs_sb.h
crash_dump.h
crc-ccitt.h
crc16.h
crc32.h
crc32c.h
crypto.h
cryptohash.h
ctype.h
cuda.h
cyclades.h
cyclomx.h
cycx_cfm.h
cycx_drv.h
cycx_x25.h
dcache.h [PATCH] inotify: lock avoidance with parent watch status in dentry 2006-03-25 08:22:53 -08:00
dccp.h
dcookies.h
debugfs.h
delay.h
devfs_fs.h
devfs_fs_kernel.h
device-mapper.h
device.h
devpts_fs.h
dio.h [PATCH] hp300: fix driver_register() return handling, remove dio_module_init() 2006-03-25 08:22:53 -08:00
dirent.h
divert.h
dm-ioctl.h
dm9000.h
dma-mapping.h
dmapool.h
dmi.h [PATCH] x86_64: Clean up and tweak ACPI blacklist year code 2006-03-25 09:10:54 -08:00
dn.h
dnotify.h
dqblk_v1.h
dqblk_v2.h
dqblk_xfs.h
ds1286.h
ds1742rtc.h
ds17287rtc.h
dtlk.h
edd.h
efi.h
efs_dir.h
efs_fs.h
efs_fs_i.h
efs_fs_sb.h
efs_vh.h
eisa.h
elevator.h
elf-fdpic.h
elf.h
elfcore.h
err.h
errno.h
errqueue.h
etherdevice.h
ethtool.h
eventpoll.h [PATCH] get_empty_filp tweaks, inline epoll_init_file() 2006-03-23 07:38:17 -08:00
ext2_fs.h
ext2_fs_sb.h
ext3_fs.h [PATCH] ext3_readdir: use generic readahead 2006-03-23 07:38:09 -08:00
ext3_fs_i.h [PATCH] convert ext3's truncate_sem to a mutex 2006-03-23 07:38:14 -08:00
ext3_fs_sb.h
ext3_jbd.h
fadvise.h [PATCH] fadvise(): write commands 2006-03-24 07:33:25 -08:00
fb.h
fcdevice.h
fcntl.h
fd.h
fd1772.h
fddidevice.h
fdreg.h
file.h [PATCH] Shrinks sizeof(files_struct) and better layout 2006-03-23 07:38:09 -08:00
filter.h
firmware.h
flat.h
font.h
fs.h Merge git://git.linux-nfs.org/pub/linux/nfs-2.6 2006-03-25 09:18:27 -08:00
fs_enet_pd.h
fs_struct.h
fsl_devices.h
fsnotify.h Merge branch 'audit.b3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current 2006-03-25 09:24:53 -08:00
ftape-header-segment.h
ftape-vendors.h
ftape.h
fuse.h
futex.h
gameport.h
gen_stats.h
genalloc.h
generic_serial.h [PATCH] sem2mutex: serial ->port_write_mutex 2006-03-23 07:38:14 -08:00
genetlink.h
genhd.h [PATCH] more for_each_cpu() conversions 2006-03-23 07:38:17 -08:00
gfp.h
hardirq.h
harrier_defs.h
hash.h
hayesesp.h
hdlc.h
hdlcdrv.h
hdpu_features.h
hdreg.h
hdsmart.h
hiddev.h
highmem.h
highuid.h
hil.h
hil_mlc.h
hippidevice.h
hp_sdc.h
hpet.h
hpfs_fs.h
hrtimer.h
hugetlb.h
hwmon-sysfs.h [PATCH] hwmon: Refactor SENSOR_DEVICE_ATTR_2 2006-03-23 14:21:50 -08:00
hwmon-vid.h
hwmon.h
hysdn_if.h
i2c-algo-bit.h
i2c-algo-ite.h
i2c-algo-pca.h
i2c-algo-pcf.h
i2c-algo-sgi.h
i2c-algo-sibyte.h
i2c-dev.h
i2c-id.h V4L/DVB (3598): Add bit algorithm adapter for the Conexant CX2341X boards. 2006-03-24 16:27:00 -03:00
i2c-isa.h
i2c-pxa.h
i2c.h [PATCH] i2c: Semaphore to mutex conversions, part 2 2006-03-23 14:21:51 -08:00
i2o-dev.h
i2o.h
i8k.h
ibmtr.h
icmp.h
icmpv6.h
ide.h [PATCH] ide: Allow IDE interface to specify its not capable of 32-bit operations 2006-03-24 07:33:28 -08:00
idr.h
if.h
if_arcnet.h
if_arp.h
if_bonding.h
if_bridge.h
if_cablemodem.h
if_ec.h
if_eql.h
if_ether.h
if_fc.h
if_fddi.h
if_frad.h
if_hippi.h
if_infiniband.h
if_ltalk.h
if_packet.h
if_plip.h
if_ppp.h
if_pppox.h
if_shaper.h
if_slip.h
if_strip.h
if_tr.h
if_tun.h
if_tunnel.h
if_vlan.h
if_wanpipe.h
if_wanpipe_common.h
igmp.h
in.h
in6.h
in_route.h
inet.h
inet_diag.h
inetdevice.h
init.h [PATCH] add a proper prototype for setup_arch() 2006-03-25 08:22:56 -08:00
init_task.h [PATCH] Shrinks sizeof(files_struct) and better layout 2006-03-23 07:38:09 -08:00
initrd.h
inotify.h [PATCH] inotify: lock avoidance with parent watch status in dentry 2006-03-25 08:22:53 -08:00
input.h
interrupt.h
io.h
ioc3.h
ioc4.h
ioctl.h
ioctl32.h
ioport.h
ioprio.h
ip.h
ip6_tunnel.h
ip_mp_alg.h
ipc.h
ipmi.h
ipmi_msgdefs.h
ipmi_smi.h
ipsec.h
ipv6.h
ipv6_route.h
ipx.h
irda.h
irq.h [PATCH] irq: uninline migration functions 2006-03-25 08:22:55 -08:00
irq_cpustat.h
isapnp.h
isdn.h
isdn_divertif.h
isdn_ppp.h
isdnif.h
isicom.h
iso_fs.h
istallion.h
ite_gpio.h
ixjuser.h
jbd.h [PATCH] jbd: embed j_commit_timer in journal struct 2006-03-25 08:22:50 -08:00
jffs.h
jffs2.h
jffs2_fs_i.h
jffs2_fs_sb.h
jhash.h
jiffies.h
journal-head.h
joystick.h
kallsyms.h
kbd_diacr.h
kbd_kern.h
kd.h
kdev_t.h
kernel.h [PATCH] roundup_pow_of_two() 64-bit fix 2006-03-25 08:22:58 -08:00
kernel_stat.h
kernelcapi.h
kexec.h
key-ui.h
key.h
keyboard.h
keyctl.h
kfifo.h
klist.h
kmalloc_sizes.h
kmod.h
kobj_map.h
kobject.h
kprobes.h [PATCH] sem2mutex: kprobes 2006-03-23 07:38:12 -08:00
kref.h
kthread.h
ktime.h
lapb.h
lcd.h
libata.h [PATCH] libata: Remove dependence on host_set->dev for SAS 2006-03-24 10:18:43 -05:00
libps2.h
limits.h
linkage.h [PATCH] abstract type/size specification for assembly 2006-03-24 07:33:25 -08:00
linux_logo.h
list.h
llc.h
loop.h [PATCH] sem2mutex: drivers/block/loop.c 2006-03-23 07:38:12 -08:00
lp.h
major.h [PATCH] parport: move PP_MAJOR from ppdev.h to major.h 2006-03-25 08:22:53 -08:00
matroxfb.h
mbcache.h
mc6821.h
mc146818rtc.h
mca-legacy.h
mca.h
memory.h
memory_hotplug.h
mempolicy.h [PATCH] cpuset memory spread slab cache optimizations 2006-03-24 07:33:23 -08:00
mempool.h
meye.h
migrate.h
mii.h
minix_fs.h
miscdevice.h
mm.h
mm_inline.h
mman.h
mmtimer.h
mmzone.h
mod_devicetable.h
module.h Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2006-03-25 08:39:20 -08:00
moduleloader.h
moduleparam.h [PATCH] kernel/params.c: make param_array() static 2006-03-25 08:22:52 -08:00
mount.h
mpage.h
mqueue.h
mroute.h
msdos_fs.h [PATCH] fat_lock is used as a mutex, convert it to using the new mutex primitive 2006-03-23 07:38:15 -08:00
msg.h
mtio.h
mutex-debug.h
mutex.h
mv643xx.h
n_r3964.h
namei.h
namespace.h
nbd.h [PATCH] sem2mutex: drivers/block/nbd.c 2006-03-23 07:38:13 -08:00
ncp.h
ncp_fs.h
ncp_fs_i.h [PATCH] sem2mutex: NCPFS 2006-03-23 07:38:14 -08:00
ncp_fs_sb.h [PATCH] sem2mutex: NCPFS 2006-03-23 07:38:14 -08:00
ncp_mount.h
ncp_no.h
net.h
netdevice.h
netfilter.h
netfilter_arp.h
netfilter_bridge.h
netfilter_decnet.h
netfilter_ipv4.h
netfilter_ipv6.h
netfilter_logging.h
netlink.h
netpoll.h
netrom.h
nfs.h
nfs2.h
nfs3.h
nfs4.h
nfs4_acl.h
nfs4_mount.h
nfs_fs.h
nfs_fs_i.h
nfs_fs_sb.h
nfs_idmap.h
nfs_mount.h
nfs_page.h
nfs_xdr.h
nfsacl.h
nfsd_idmap.h
nls.h
nmi.h
node.h
nodemask.h
notifier.h
nubus.h
numa.h
nvram.h
openprom_fs.h
oprofile.h
page-flags.h
pagemap.h [PATCH] cpuset memory spread page cache implementation and hooks 2006-03-24 07:33:22 -08:00
pagevec.h
param.h
parport.h
parport_pc.h
parser.h
patchkey.h
pci-acpi.h
pci.h [PATCH] PCI: fix pci_request_region[s] arg 2006-03-23 14:35:16 -08:00
pci_ids.h [PATCH] Secure Digital Host Controller id and regs 2006-03-24 07:33:27 -08:00
pci_regs.h
pcieport_if.h
percpu.h
percpu_counter.h
personality.h
pfkeyv2.h
pg.h
phonedev.h
phy.h
pid.h
pipe_fs_i.h
pkt_cls.h
pkt_sched.h
pktcdvd.h
platform_device.h
pm.h [PATCH] kernel/power: move externs to header files 2006-03-23 07:38:07 -08:00
pm_legacy.h
pmu.h
pnp.h
pnpbios.h
poll.h
posix-timers.h
posix_acl.h
posix_acl_xattr.h
posix_types.h
ppdev.h [PATCH] parport: move PP_MAJOR from ppdev.h to major.h 2006-03-25 08:22:53 -08:00
ppp-comp.h
ppp_channel.h
ppp_defs.h
prctl.h
preempt.h
prefetch.h
prio_tree.h
proc_fs.h [PATCH] protect remove_proc_entry 2006-03-26 08:56:53 -08:00
profile.h [PATCH] notifier: profile.h forward decl fix 2006-03-23 07:38:16 -08:00
ps2esdi.h
ptrace.h
qic117.h
qnx4_fs.h
qnxtypes.h
quota.h [PATCH] Small cleanup in quota.h 2006-03-25 08:22:51 -08:00
quotaio_v1.h
quotaio_v2.h
quotaops.h
radeonfb.h
radix-tree.h [PATCH] radix-tree documentation cleanups 2006-03-25 08:22:59 -08:00
raid_class.h
ramfs.h
random.h
raw.h
rbtree.h
rcupdate.h [PATCH] kernel/rcupdate.c: make two structs static 2006-03-23 07:38:17 -08:00
reboot.h
reboot_fixups.h
reiserfs_acl.h
reiserfs_fs.h [PATCH] reiserfs: fix transaction overflowing 2006-03-25 08:22:51 -08:00
reiserfs_fs_i.h
reiserfs_fs_sb.h
reiserfs_xattr.h [PATCH] reiserfs: cleanups 2006-03-25 08:22:53 -08:00
relay.h [PATCH] relay: migrate from relayfs to a generic relay API 2006-03-23 19:56:55 +01:00
relayfs_fs.h
resource.h
rio.h
rio_drv.h
rio_ids.h
rio_regs.h
rmap.h
romfs_fs.h
root_dev.h
rose.h
route.h
rslib.h
rtc.h
rtnetlink.h
rwsem-spinlock.h
rwsem.h
sc26198.h
scatterlist.h
scc.h
sched.h [PATCH] timer-irq-driven soft-watchdog, cleanups 2006-03-24 07:33:30 -08:00
screen_info.h
sctp.h
scx200.h
scx200_gpio.h
sdla.h
sdla_asy.h
sdla_chdlc.h
sdla_fr.h
sdla_ppp.h
sdla_x25.h
sdladrv.h
sdlapci.h
sdlasfm.h
seccomp.h
securebits.h
security.h Merge branch 'audit.b3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current 2006-03-25 09:24:53 -08:00
selection.h
selinux_netlink.h
sem.h
seq_file.h [PATCH] sem2mutex: fs/seq_file.c 2006-03-23 07:38:12 -08:00
seqlock.h
serial.h
serial167.h
serialP.h
serial_8250.h [ARM] 3383/3: ixp2000: ixdp2x01 platform serial conversion 2006-03-25 23:03:13 +00:00
serial_core.h
serial_ip3106.h
serial_reg.h
serio.h
shm.h
shmem_fs.h
signal.h
skbuff.h
slab.h [PATCH] slab: optimize constant-size kzalloc calls 2006-03-25 08:22:49 -08:00
smb.h
smb_fs.h
smb_fs_i.h
smb_fs_sb.h
smb_mount.h
smbno.h
smp.h
smp_lock.h
snmp.h
socket.h
sockios.h
som.h
sonet.h
sonypi.h
sort.h
sound.h
soundcard.h
spinlock.h
spinlock_api_smp.h
spinlock_api_up.h
spinlock_types.h
spinlock_types_up.h
spinlock_up.h
stallion.h
stat.h
statfs.h
stddef.h
stop_machine.h
string.h [PATCH] strndup_user() 2006-03-24 07:33:31 -08:00
stringify.h
superhyway.h
suspend.h
swap.h [PATCH] swsusp: low level interface 2006-03-23 07:38:07 -08:00
swapops.h
synclink.h
sys.h
syscalls.h [PATCH] add sys_unshare to syscalls.h 2006-03-24 07:33:15 -08:00
sysctl.h
sysdev.h
sysfs.h
sysrq.h
sysv_fs.h
tcp.h
telephony.h
termios.h
textsearch.h
textsearch_fsm.h
tfrc.h
thread_info.h
threads.h
ticable.h
time.h [PATCH] sys_alarm() unsigned signed conversion fixup 2006-03-25 08:22:48 -08:00
timer.h Fix simple typos 2006-03-24 18:13:37 +01:00
times.h
timex.h [PATCH] remove pps support 2006-03-25 08:23:02 -08:00
tiocl.h
tipc.h
tipc_config.h
topology.h
toshiba.h
transport_class.h
trdevice.h
tty.h [PATCH] sem2mutex: tty 2006-03-23 07:38:11 -08:00
tty_driver.h
tty_flip.h [PATCH] constify tty flip buffer handling 2006-03-25 08:22:52 -08:00
tty_ldisc.h
types.h
udf_fs.h
udf_fs_i.h [PATCH] udf: remove duplicate definitions 2006-03-25 08:23:01 -08:00
udf_fs_sb.h [PATCH] sem2mutex: UDF 2006-03-23 07:38:14 -08:00
udp.h
ufs_fs.h
ufs_fs_i.h
ufs_fs_sb.h
uinput.h
uio.h
ultrasound.h
umem.h
un.h
unistd.h
usb.h
usb_cdc.h
usb_ch9.h
usb_gadget.h
usb_gadgetfs.h
usb_input.h
usb_isp116x.h
usb_otg.h
usb_sl811.h
usb_usual.h
usbdevice_fs.h
user.h
utime.h
uts.h
utsname.h
vermagic.h
vfs.h
via.h
video_decoder.h
video_encoder.h
videodev.h
videodev2.h V4L/DVB (3584): Implement V4L2_TUNER_MODE_LANG1_LANG2 audio mode 2006-03-24 16:26:58 -03:00
videotext.h
vmalloc.h
vt.h
vt_buffer.h
vt_kern.h [PATCH] swsusp: add check for suspension of X-controlled devices 2006-03-23 07:38:08 -08:00
wait.h
wanpipe.h
wanrouter.h
watchdog.h
wavefront.h
wireless.h [PATCH] WE-20 for kernel 2.6.16 2006-03-23 07:12:57 -05:00
workqueue.h
writeback.h [PATCH] balance_dirty_pages_ratelimited: take nr_pages arg 2006-03-24 07:33:26 -08:00
x25.h
x1205.h
xattr.h
xfrm.h
yam.h
zconf.h
zftape.h
zlib.h
zorro.h [PATCH] amiga: fix driver_register() return handling, remove zorro_module_init() 2006-03-25 08:22:53 -08:00
zorro_ids.h
zutil.h