OpenCloudOS-Kernel/fs/afs
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
..
Kconfig fs/Kconfig: move afs out 2009-01-22 13:16:01 +03:00
Makefile AFS: implement file locking 2007-07-16 09:05:43 -07:00
afs.h AFS: implement file locking 2007-07-16 09:05:43 -07:00
afs_cm.h afs: support the CB.ProbeUuid RPC op 2008-04-29 08:06:26 -07:00
afs_fs.h AFS: implement file locking 2007-07-16 09:05:43 -07:00
afs_vl.h [AF_RXRPC]: Make the in-kernel AFS filesystem use AF_RXRPC. 2007-04-26 15:55:03 -07:00
cache.c [AF_RXRPC]: Make the in-kernel AFS filesystem use AF_RXRPC. 2007-04-26 15:55:03 -07:00
cache.h [AFS]: Clean up the AFS sources 2007-04-26 15:49:28 -07:00
callback.c Fix various old email addresses for dwmw2 2008-06-06 11:29:10 -07:00
cell.c afs: use the shorter LIST_HEAD for brevity 2008-04-29 08:06:26 -07:00
cmservice.c afs: support the CB.ProbeUuid RPC op 2008-04-29 08:06:26 -07:00
dir.c constify dentry_operations: AFS 2009-03-27 14:44:00 -04:00
file.c afs: convert to new aops 2008-10-16 11:21:48 -07:00
flock.c AFS: clean up explicit check for mandatory locks 2007-10-09 18:32:46 -04:00
fsclient.c AFS: implement file locking 2007-07-16 09:05:43 -07:00
inode.c Fix various old email addresses for dwmw2 2008-06-06 11:29:10 -07:00
internal.h afs: convert to new aops 2008-10-16 11:21:48 -07:00
main.c AFS: Do not describe debug parameters with their value 2008-04-16 07:43:48 -07:00
misc.c AFS: implement file locking 2007-07-16 09:05:43 -07:00
mntpt.c [PATCH] pass struct path * to do_add_mount() 2008-08-01 11:25:32 -04:00
netdevices.c [NET]: Make the device list and device lookups per namespace. 2007-10-10 16:49:10 -07:00
proc.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
rxrpc.c fs/afs/: possible cleanups 2007-10-17 08:42:50 -07:00
security.c [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
server.c fs: replace NIPQUAD() 2008-10-31 00:56:28 -07:00
super.c vfs: Use const for kernel parser table 2008-10-13 10:10:37 -07:00
vlclient.c [AFS]: Add security support. 2007-04-26 15:57:07 -07:00
vlocation.c fs/afs/vlocation.c: fix off-by-one 2007-11-05 15:12:32 -08:00
vnode.c AFS: drop explicit extern 2007-07-16 09:05:43 -07:00
volume.c Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
write.c fs: symlink write_begin allocation context fix 2009-01-04 13:33:20 -08:00