linux/arch/ia64
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
..
configs [IA64] fixes configs and add default config for ia64 xen domU 2009-02-19 11:39:06 -08:00
dig [IA64] Add Variable Page Size and IA64 Support in Intel IOMMU 2008-10-17 12:14:13 -07:00
hp Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
ia32 generic compat_sys_ustat 2009-03-27 14:43:57 -04:00
include/asm Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
kernel proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
kvm KVM: ia64: Fix the build errors due to lack of macros related to MSI. 2009-03-24 11:03:13 +02:00
lib [IA64] Add Variable Page Size and IA64 Support in Intel IOMMU 2008-10-17 12:14:13 -07:00
mm mm: fix memmap init for handling memory hole 2009-02-18 15:37:55 -08:00
oprofile oprofile: more whitespace fixes 2008-10-15 20:55:51 +02:00
pci [IA64] SN specific version of dma_get_required_mask() 2009-01-15 10:42:16 -08:00
scripts ia64/pv_ops: paravirtualized instruction checker. 2008-10-17 10:12:54 -07:00
sn proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
uv [IA64] Simplify SGI uv vs. sn2 driver issues 2008-11-04 11:29:39 -08:00
xen [IA64] xen_domu build fix 2009-02-19 12:05:00 -08:00
install.sh Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig [IA64] enable setting DMAR on by default 2009-02-25 11:40:27 -08:00
Kconfig.debug [PATCH] Move Kprobes and Oprofile to "Instrumentation Support" menu 2005-11-07 07:53:35 -08:00
Makefile Pull vtd-iommu into release branch 2008-10-17 13:52:22 -07:00
module.lds Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00