kernel-fxtec-pro1x/arch/x86
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
..
boot x86, setup: fix the setting of 480-line VGA modes 2009-03-18 16:54:05 -07:00
configs Merge branches 'x86/apic', 'x86/defconfig', 'x86/memtest', 'x86/mm' and 'linus' into x86/core 2009-02-26 06:31:32 +01:00
crypto crypto: aes-ni - Add support to Intel AES-NI instructions for x86_64 platform 2009-02-18 16:48:06 +08:00
ia32 Merge branch 'linus' into percpu-cpumask-x86-for-linus-2 2009-03-28 04:26:01 +01:00
include/asm Merge branch 'x86-stage-3-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-03-30 11:38:31 -07:00
kernel proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
kvm KVM: VMX: Don't allow uninhibited access to EFER on i386 2009-03-24 11:03:15 +02:00
lguest Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
lib x86: memcpy, clean up 2009-03-12 12:21:17 +01:00
math-emu Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
mm Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
oprofile x86: oprofile: don't set counter width from cpuid on Core2 2009-03-03 12:04:22 +01:00
pci x86, PAT, PCI: Change vma prot in pci_mmap to reflect inherited prot 2009-03-24 10:42:35 +01:00
power x86: use _types.h headers in asm where available 2009-02-13 11:35:01 -08:00
vdso x86, mm: rename TASK_SIZE64 => TASK_SIZE_MAX 2009-02-21 00:09:44 +01:00
video
xen x86: with the last user gone, remove set_pte_present 2009-03-19 14:04:19 +01:00
Kconfig Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
Kconfig.cpu x86/centaur: merge 32 & 64 bit version 2009-03-14 16:27:29 +01:00
Kconfig.debug Merge branch 'linus' into x86/apic 2009-02-22 20:05:19 +01:00
Makefile x86: use targets in the boot Makefile instead of CLEAN_FILES 2009-03-12 13:43:14 -07:00
Makefile_32.cpu