linux/fs/proc
Denis V. Lunev c4185a0e01 proc: proc_get_inode() should get module only once
Any file under /proc/net opened more than once leaked the refcounter
on the module it belongs to.

The problem is that module_get is called for each file opening while
module_put is called only when /proc inode is destroyed. So, lets put
module counter if we are dealing with already initialised inode.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=10737

Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: David Miller <davem@davemloft.net>
Cc: Patrick McHardy <kaber@trash.net>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Robert Olsson <robert.olsson@its.uu.se>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Roland Kletzing <devzero@web.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-24 09:56:11 -07:00
..
array.c capabilities: add bounding set to /proc/self/status 2008-05-13 08:02:24 -07:00
base.c [PATCH] open sessionid permissions 2008-05-17 03:27:27 -04:00
generic.c netns: assign PDE->data before gluing entry into /proc tree 2008-05-02 04:12:41 -07:00
inode-alloc.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
inode.c proc: proc_get_inode() should get module only once 2008-05-24 09:56:11 -07:00
internal.h proc: remove proc_root from drivers 2008-04-29 08:06:18 -07:00
kcore.c aout: remove unnecessary inclusions of {asm, linux}/a.out.h 2008-02-08 09:22:30 -08:00
kmsg.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
Makefile [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
mmu.c fs/proc/mmu.c: headers butchery 2007-10-17 08:42:48 -07:00
nommu.c proc: switch to proc_create() 2008-04-29 08:06:17 -07:00
proc_devtree.c [POWERPC] Make struct property's value a void * 2007-04-13 03:55:18 +10:00
proc_misc.c mm: fix atomic_t overflow in vm 2008-05-24 09:56:09 -07:00
proc_net.c netns: assign PDE->data before gluing entry into /proc tree 2008-05-02 04:12:41 -07:00
proc_sysctl.c sysctl: add the ->permissions callback on the ctl_table_root 2008-04-29 08:06:23 -07:00
proc_tty.c tty: The big operations rework 2008-04-30 08:29:47 -07:00
root.c proc: introduce proc_create_data to setup de->data 2008-04-29 08:06:20 -07:00
task_mmu.c fs/proc/task_mmu.c: remove duplicated include files 2008-05-08 10:56:22 -07:00
task_nommu.c task_nommu: fix compile failing bug because of spilt file.h 2008-05-04 17:08:48 -07:00
vmcore.c aout: remove unnecessary inclusions of {asm, linux}/a.out.h 2008-02-08 09:22:30 -08:00