original_kernel/fs/proc
Francesco Ruggeri 6bf6104573 fs/proc: fix potential unregister_sysctl_table hang
The unregister_sysctl_table() function hangs if all references to its
ctl_table_header structure are not dropped.

This can happen sometimes because of a leak in proc_sys_lookup():
proc_sys_lookup() gets a reference to the table via lookup_entry(), but
it does not release it when a subsequent call to sysctl_follow_link()
fails.

This patch fixes this leak by making sure the reference is always
dropped on return.

See also commit 076c3eed2c ("sysctl: Rewrite proc_sys_lookup
introducing find_entry and lookup_entry") which reorganized this code in
3.4.

Tested in Linux 3.4.4.

Signed-off-by: Francesco Ruggeri <fruggeri@aristanetworks.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-09-17 10:32:03 -07:00
..
Kconfig
Makefile
array.c
base.c proc: do not allow negative offsets on /proc/<pid>/environ 2012-07-30 17:25:20 -07:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
generic.c
inode.c
internal.h
interrupts.c
kcore.c
kmsg.c
loadavg.c
meminfo.c
mmu.c
namespaces.c
nommu.c
page.c
proc_devtree.c
proc_net.c
proc_sysctl.c fs/proc: fix potential unregister_sysctl_table hang 2012-09-17 10:32:03 -07:00
proc_tty.c
root.c VFS: Pass mount flags to sget() 2012-07-14 16:38:34 +04:00
softirqs.c
stat.c
task_mmu.c
task_nommu.c
uptime.c
version.c
vmcore.c