linux_dsm_epyc7002/arch/ia64/sn/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
..
sn2 proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
bte_error.c [IA64] Fix Altix BTE error return status 2007-12-19 11:19:19 -08:00
bte.c [IA64] bte_copy of BTE_MAX_XFER trips BUG_ON. 2009-02-19 11:29:31 -08:00
huberror.c [IA64] minor irq handler cleanups 2008-04-22 08:56:58 -07:00
idle.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
io_acpi_init.c PCI: return error on failure to read PCI ROMs 2009-02-04 16:58:41 -08:00
io_common.c ACPI: remove private acpica headers from driver files 2008-12-31 01:15:22 -05:00
io_init.c PCI: return error on failure to read PCI ROMs 2009-02-04 16:58:41 -08:00
iomv.c [IA64] Move include/asm-ia64 to arch/ia64/include/asm 2008-08-01 10:21:21 -07:00
irq.c cpumask: make irq_set_affinity() take a const struct cpumask 2008-12-13 21:20:26 +10:30
klconflib.c [IA64-SGI] sn2 housekeeping 2006-02-02 13:35:59 -08:00
machvec.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile [IA64] move XP and XPC to drivers/misc/sgi-xp 2008-04-22 15:08:17 -07:00
mca.c [IA64] remove remaining __FUNCTION__ occurrences 2008-03-06 09:19:27 -08:00
msi_sn.c irq: update all arches for new irq_desc 2009-01-12 15:27:13 -08:00
pio_phys.S [IA64-SGI] - Eliminate SN pio_phys_xxx macros. Move to assembly 2006-02-07 09:24:14 -08:00
setup.c [IA64] Clear up section mismatch for sn_check_wars. 2008-12-09 10:08:39 -08:00
tiocx.c IA64: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:40 -08:00