1
linux/fs/jfs
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
..
acl.c jfs: Use lowercase names of quota functions 2009-03-26 02:18:37 +01:00
endian24.h
file.c
inode.c jfs: Use lowercase names of quota functions 2009-03-26 02:18:37 +01:00
ioctl.c
jfs_acl.h
jfs_btree.h
jfs_debug.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
jfs_debug.h
jfs_dinode.h
jfs_dmap.c
jfs_dmap.h
jfs_dtree.c jfs: Use lowercase names of quota functions 2009-03-26 02:18:37 +01:00
jfs_dtree.h
jfs_extent.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6 2009-03-30 10:02:36 -07:00
jfs_extent.h
jfs_filsys.h
jfs_imap.c jfs: clean up a dangling comment 2009-01-09 10:53:35 -06:00
jfs_imap.h
jfs_incore.h
jfs_inode.c jfs: Use lowercase names of quota functions 2009-03-26 02:18:37 +01:00
jfs_inode.h constify dentry_operations: JFS 2009-03-27 14:44:02 -04:00
jfs_lock.h
jfs_logmgr.c
jfs_logmgr.h
jfs_metapage.c jfs: Fix error handling in metapage_writepage() 2009-01-30 14:09:06 -06:00
jfs_metapage.h
jfs_mount.c
jfs_superblock.h
jfs_txnmgr.c
jfs_txnmgr.h
jfs_types.h jfs: remove xtLookupList() 2009-01-09 15:42:04 -06:00
jfs_umount.c
jfs_unicode.c
jfs_unicode.h
jfs_uniupr.c
jfs_xattr.h
jfs_xtree.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6 2009-03-30 10:02:36 -07:00
jfs_xtree.h jfs: remove xtLookupList() 2009-01-09 15:42:04 -06:00
Kconfig jfs: needs crc32_le 2009-02-02 13:43:28 -06:00
Makefile
namei.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2009-03-27 16:23:12 -07:00
resize.c
super.c Merge branch 'master' of /home/shaggy/git/linus-clean/ 2009-02-02 13:40:55 -06:00
symlink.c
xattr.c jfs: Use lowercase names of quota functions 2009-03-26 02:18:37 +01:00