alistair23-linux/fs/proc
Alexey Dobriyan 1da4d377f9 proc: revalidate misc dentries
If module removes proc directory while another process pins it by
chdir'ing to it, then subsequent recreation of proc entry and all
entries down the tree will not be visible to any process until pinning
process unchdir from directory and unpins everything.

Steps to reproduce:

	proc_mkdir("aaa", NULL);
	proc_create("aaa/bbb", ...);

		chdir("/proc/aaa");

	remove_proc_entry("aaa/bbb", NULL);
	remove_proc_entry("aaa", NULL);

	proc_mkdir("aaa", NULL);
	# inaccessible because "aaa" dentry still points
	# to the original "aaa".
	proc_create("aaa/bbb", ...);

Fix is to implement ->d_revalidate and ->d_delete.

Link: http://lkml.kernel.org/r/20180312201938.GA4871@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-04-13 17:10:27 -07:00
..
array.c proc: replace seq_printf by seq_put_smth to speed up /proc/pid/status 2018-04-11 10:28:33 -07:00
base.c proc: do mmput ASAP for /proc/*/map_files 2018-04-11 10:28:34 -07:00
cmdline.c proc: faster /proc/cmdline 2018-04-11 10:28:34 -07:00
consoles.c fs/proc/consoles.c: use seq_putc() in show_console_dev() 2018-02-06 18:32:44 -08:00
cpuinfo.c
devices.c
fd.c proc: use %u for pid printing and slightly less stack 2018-02-06 18:32:43 -08:00
fd.h
generic.c proc: revalidate misc dentries 2018-04-13 17:10:27 -07:00
inode.c proc: move "struct proc_dir_entry" into kmem cache 2018-04-11 10:28:34 -07:00
internal.h proc: use slower rb_first() 2018-04-11 10:28:34 -07:00
interrupts.c
Kconfig
kcore.c vfs/proc/kcore, x86/mm/kcore: Fix SMAP fault when dumping vsyscall user page 2018-02-13 09:15:58 +01:00
kmsg.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
loadavg.c pid: replace pid bitmap implementation with IDR API 2017-11-17 16:10:03 -08:00
Makefile proc: : uninline name_to_int() 2017-11-17 16:10:00 -08:00
meminfo.c proc: add seq_put_decimal_ull_width to speed up /proc/pid/smaps 2018-04-11 10:28:33 -07:00
namespaces.c
nommu.c
page.c
proc_net.c proc: use slower rb_first() 2018-04-11 10:28:34 -07:00
proc_sysctl.c fs/proc/proc_sysctl.c: fix typo in sysctl_check_table_array() 2018-04-11 10:28:38 -07:00
proc_tty.c
root.c proc: use slower rb_first() 2018-04-11 10:28:34 -07:00
self.c fs/proc: use __ro_after_init 2018-02-06 18:32:43 -08:00
softirqs.c
stat.c
task_mmu.c proc: replace seq_printf on seq_putc to speed up /proc/pid/smaps 2018-04-11 10:28:33 -07:00
task_nommu.c
thread_self.c fs/proc: use __ro_after_init 2018-02-06 18:32:43 -08:00
uptime.c
util.c proc: use do-while in name_to_int() 2017-11-17 16:10:00 -08:00
version.c
vmcore.c fs/proc/vmcore.c: simpler /proc/vmcore cleanup 2018-02-06 18:32:43 -08:00