linux/fs/nfs
Alexey Dobriyan 99b7623380 proc 2/2: remove struct proc_dir_entry::owner
Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
as correctly noted at bug #12454. Someone can lookup entry with NULL
->owner, thus not pinning enything, and release it later resulting
in module refcount underflow.

We can keep ->owner and supply it at registration time like ->proc_fops
and ->data.

But this leaves ->owner as easy-manipulative field (just one C assignment)
and somebody will forget to unpin previous/pin current module when
switching ->owner. ->proc_fops is declared as "const" which should give
some thoughts.

->read_proc/->write_proc were just fixed to not require ->owner for
protection.

rmmod'ed directories will be empty and return "." and ".." -- no harm.
And directories with tricky enough readdir and lookup shouldn't be modular.
We definitely don't want such modular code.

Removing ->owner will also make PDE smaller.

So, let's nuke it.

Kudos to Jeff Layton for reminding about this, let's say, oversight.

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

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-03-31 01:14:44 +04:00
..
callback_proc.c
callback_xdr.c
callback.c rpc: allow gss callbacks to client 2008-12-23 16:18:34 -05:00
callback.h
client.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
delegation.c NFSv4: Convert delegation->type field to fmode_t 2008-12-23 15:21:53 -05:00
delegation.h NFSv4: Convert delegation->type field to fmode_t 2008-12-23 15:21:53 -05:00
dir.c constify dentry_operations: NFS 2009-03-27 14:43:59 -04:00
direct.c
file.c fs: symlink write_begin allocation context fix 2009-01-04 13:33:20 -08:00
getroot.c
idmap.c
inode.c optimize attribute timeouts for "noac" and "actimeo=0" 2008-12-23 15:21:56 -05:00
internal.h
iostat.h
Kconfig fs/Kconfig: move nfs out 2009-01-22 13:16:00 +03:00
Makefile
mount_clnt.c
namespace.c
nfs2xdr.c
nfs3acl.c NFSv3: Fix posix ACL code 2009-03-10 20:33:18 -04:00
nfs3proc.c
nfs3xdr.c NFSv3: Fix posix ACL code 2009-03-10 20:33:18 -04:00
nfs4_fs.h constify dentry_operations: NFS 2009-03-27 14:43:59 -04:00
nfs4namespace.c NFS: Fix misparsing of nfsv4 fs_locations attribute (take 2) 2009-03-10 20:33:17 -04:00
nfs4proc.c fs/nfs/nfs4proc.c: make nfs4_map_errors() static 2008-12-30 16:35:55 -05:00
nfs4renewd.c
nfs4state.c NFSv4: Convert the open and close ops to use fmode 2008-12-23 15:21:56 -05:00
nfs4xdr.c NFS: remove unused status from encode routines 2008-12-23 16:06:18 -05:00
nfsroot.c Merge branch 'devel' into next 2008-12-30 16:51:43 -05:00
pagelist.c
proc.c
read.c
super.c Merge branch 'devel' into next 2008-12-30 16:51:43 -05:00
symlink.c
sysctl.c
unlink.c
write.c