linux/drivers/net/irda
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
..
act200l-sir.c irda: replace __FUNCTION__ with __func__ 2008-07-30 17:20:18 -07:00
actisys-sir.c irda: replace __FUNCTION__ with __func__ 2008-07-30 17:20:18 -07:00
ali-ircc.c irda: convert ali driver to net_device_ops 2009-03-21 19:33:46 -07:00
ali-ircc.h irda: convert to internal stats 2009-01-06 10:40:43 -08:00
au1k_ir.c irda: fix incomplete conversation to internal stats 2009-01-11 00:01:31 -08:00
au1000_ircc.h irda: convert to internal stats 2009-01-06 10:40:43 -08:00
donauboe.c IRDA: convert donauboe to net_device_ops 2009-03-27 00:46:43 -07:00
donauboe.h irda: convert to internal stats 2009-01-06 10:40:43 -08:00
ep7211-sir.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
esi-sir.c
girbil-sir.c irda: replace __FUNCTION__ with __func__ 2008-07-30 17:20:18 -07:00
irda-usb.c irda: convert irda_usb to net_device_ops 2009-03-21 19:19:16 -07:00
irda-usb.h irda: convert to internal stats 2009-01-06 10:40:43 -08:00
irtty-sir.c tty: Flags should be accessed via the foo_bit interfaces 2008-12-05 22:31:52 -08:00
irtty-sir.h
Kconfig
kingsun-sir.c irda: convert kingsun device to net_device_ops 2009-03-21 19:33:49 -07:00
ks959-sir.c irda: convert ks959 driver to net_device_ops 2009-03-21 19:33:51 -07:00
ksdazzle-sir.c irda: convert ksdazzle device to net_device_ops 2009-03-21 19:33:50 -07:00
litelink-sir.c irda: replace __FUNCTION__ with __func__ 2008-07-30 17:20:18 -07:00
ma600-sir.c drivers/net/irda: fix sparse warnings: make symbols static 2008-12-26 00:03:19 -08:00
Makefile
mcp2120-sir.c irda: replace __FUNCTION__ with __func__ 2008-07-30 17:20:18 -07:00
mcs7780.c irda: convert mcs driver to net_device_ops 2009-03-21 19:19:17 -07:00
mcs7780.h irda: convert to internal stats 2009-01-06 10:40:43 -08:00
nsc-ircc.c irda: convert nsc_ircc driver to net_device_ops 2009-03-21 19:33:46 -07:00
nsc-ircc.h irda: convert to internal stats 2009-01-06 10:40:43 -08:00
old_belkin-sir.c irda: replace __FUNCTION__ with __func__ 2008-07-30 17:20:18 -07:00
pxaficp_ir.c [ARM] pxa: separate definitions from pxa-regs.h and remove it finally 2009-03-09 21:22:40 +08:00
sa1100_ir.c irda: convert to internal stats 2009-01-06 10:40:43 -08:00
sir_dev.c irda: convert sir device to net_device_ops 2009-03-21 19:33:49 -07:00
sir_dongle.c remove CONFIG_KMOD from drivers 2008-10-17 02:38:35 +11:00
sir-dev.h irda: convert to internal stats 2009-01-06 10:40:43 -08:00
smsc-ircc2.c irda: convert smsc driver to net_device_ops 2009-03-21 19:33:47 -07:00
smsc-ircc2.h
smsc-sio.h
stir4200.c stir4200: convert to net_device_ops 2009-03-21 19:19:17 -07:00
tekram-sir.c irda: replace __FUNCTION__ with __func__ 2008-07-30 17:20:18 -07:00
toim3232-sir.c irda: replace __FUNCTION__ with __func__ 2008-07-30 17:20:18 -07:00
via-ircc.c irda: convert via-ircc to net_device_ops 2009-03-21 19:33:48 -07:00
via-ircc.h irda: convert to internal stats 2009-01-06 10:40:43 -08:00
vlsi_ir.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
vlsi_ir.h irda: convert to internal stats 2009-01-06 10:40:43 -08:00
w83977af_ir.c irda: convert w83977af_ir to net_device_ops 2009-03-21 19:33:45 -07:00
w83977af_ir.h irda: convert to internal stats 2009-01-06 10:40:43 -08:00
w83977af.h