1
linux/arch/ia64/kernel
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
..
cpufreq [IA64] improper printk format in acpi-cpufreq 2008-07-17 11:11:17 -07:00
.gitignore [IA64] Cleanup generated file not ignored by .gitignore 2008-08-04 11:06:16 -07:00
acpi-ext.c
acpi-processor.c
acpi.c [IA64] fix __apci_unmap_table 2009-02-16 00:43:24 +01:00
asm-offsets.c ia64/pv_ops/xen: elf note based xen startup. 2008-10-17 10:02:21 -07:00
audit.c
brl_emu.c
crash_dump.c kdump: make elfcorehdr_addr independent of CONFIG_PROC_VMCORE 2008-10-20 08:52:39 -07:00
crash.c
cyclone.c
efi_stub.S
efi.c always reserve elfcore header memory in crash kernel 2008-10-20 08:52:40 -07:00
entry.h
entry.S [CVE-2009-0029] Remove __attribute__((weak)) from sys_pipe/sys_pipe2 2009-01-14 14:15:15 +01:00
err_inject.c sysdev: Pass the attribute to the low level sysdev show/store function 2008-07-21 21:55:02 -07:00
esi_stub.S
esi.c
fsys.S
fsyscall_gtod_data.h
gate-data.S
gate.lds.S
gate.S
head.S [IA64] Rationalize kernel mode alignment checking 2008-11-20 13:27:12 -08:00
ia64_ksyms.c
init_task.c take init_fs to saner place 2008-12-31 18:07:42 -05:00
iosapic.c Merge branch 'x86/urgent' into x86/pat 2009-03-01 12:47:58 +01:00
irq_ia64.c Merge branch 'percpu-cpumask-x86-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-03-28 13:48:38 -07:00
irq_lsapic.c
irq.c Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
ivt.S ia64/pv_ops: fix paravirtualization of ivt.S with CONFIG_SMP=n 2008-10-17 09:50:09 -07:00
jprobes.S [IA64] Move include/asm-ia64 to arch/ia64/include/asm 2008-08-01 10:21:21 -07:00
kprobes.c kprobes: check CONFIG_FREEZER instead of CONFIG_PM 2009-01-16 14:32:17 -05:00
machine_kexec.c
machvec.c
Makefile Pull vtd-iommu into release branch 2008-10-17 13:52:22 -07:00
mca_asm.S
mca_drv_asm.S
mca_drv.c CRED: Wrap task credential accesses in the IA64 arch 2008-11-14 10:38:37 +11:00
mca_drv.h
mca.c [IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack 2008-11-20 13:31:10 -08:00
minstate.h [IA64] pvops: paravirtualize minstate.h. 2008-05-27 15:02:17 -07:00
module.c [IA64] fix compile failure with non modular builds 2008-09-10 10:46:32 -07:00
msi_ia64.c Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
nr-irqs.c ia64/pv_ops/xen: define the nubmer of irqs which xen needs. 2008-10-17 10:06:59 -07:00
numa.c
pal.S
palinfo.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
paravirt_inst.h ia64/pv_ops: paravirtualized instruction checker. 2008-10-17 10:12:54 -07:00
paravirt.c [IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case. 2008-11-20 13:41:20 -08:00
paravirtentry.S [IA64] pvops: paravirtualize entry.S 2008-05-27 15:08:01 -07:00
patch.c [IA64] Workaround for RSE issue 2008-05-27 13:24:39 -07:00
pci-dma.c IA64: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:40 -08:00
pci-swiotlb.c [IA64] Add Variable Page Size and IA64 Support in Intel IOMMU 2008-10-17 12:14:13 -07:00
perfmon_default_smpl.c
perfmon_generic.h
perfmon_itanium.h
perfmon_mckinley.h
perfmon_montecito.h
perfmon.c constify dentry_operations: rest 2009-03-27 14:44:03 -04:00
process.c Pull pv_ops-xen into release branch 2008-10-17 13:51:28 -07:00
ptrace.c [IA64] utrace use generic trace hook 2008-10-06 10:43:06 -07:00
relocate_kernel.S
sal.c [IA64] Update check_sal_cache_flush to use platform_send_ipi() 2008-06-11 16:40:33 -07:00
salinfo.c
setup.c [IA64] Reserve elfcorehdr memory in CONFIG_CRASH_DUMP 2008-11-07 09:51:55 -08:00
sigframe.h
signal.c CRED: Wrap task credential accesses in the IA64 arch 2008-11-14 10:38:37 +11:00
smp.c [IA64] Shrink shadow_flush_counts to a short array to save 8k of per_cpu area. 2008-08-18 15:39:48 -07:00
smpboot.c [IA64] Remove redundant cpu_clear() in __cpu_disable path 2009-02-19 11:32:50 -08:00
sys_ia64.c [CVE-2009-0029] Remove __attribute__((weak)) from sys_pipe/sys_pipe2 2009-01-14 14:15:15 +01:00
time.c [PATCH] idle cputime accounting 2008-12-31 15:11:46 +01:00
topology.c cpumask: change cpumask_scnprintf, cpumask_parse_user, cpulist_parse, and cpulist_scnprintf to take pointers. 2008-12-13 21:20:25 +10:30
traps.c
unaligned.c [IA64] dump stack on kernel unaligned warnings 2009-01-15 10:38:56 -08:00
uncached.c smp_call_function: get rid of the unused nonatomic/retry argument 2008-06-26 11:24:35 +02:00
unwind_decoder.c
unwind_i.h
unwind.c [IA64] Do not go beyond ARRAY_SIZE of unw.hash 2009-02-25 11:48:04 -08:00
vmlinux.lds.S linker script: define __per_cpu_load on all SMP capable archs 2009-03-10 16:27:48 +09:00