2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 04:03:58 +08:00
linux-next/drivers/s390/block
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
..
dasd_3990_erp.c [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dasd_alias.c [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dasd_devmap.c [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dasd_diag.c [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dasd_diag.h [S390] dasd whitespace and other cosmetics. 2006-06-29 14:58:12 +02:00
dasd_eckd.c [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dasd_eckd.h [S390] dasd: add High Performance FICON support 2009-03-26 15:24:05 +01:00
dasd_eer.c [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dasd_erp.c [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dasd_fba.c [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dasd_fba.h [S390] dasd whitespace and other cosmetics. 2006-06-29 14:58:12 +02:00
dasd_genhd.c [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dasd_int.h [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dasd_ioctl.c [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dasd_proc.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
dasd.c [S390] dasd: message cleanup 2009-03-26 15:24:05 +01:00
dcssblk.c s390: remove s390_root_dev_*() 2009-01-06 10:44:34 -08:00
Kconfig [S390] dasd: fix double elevator_exit call when deadline iosched fails to load 2008-04-17 07:46:55 +02:00
Makefile [S390] dasd: add hyper PAV support to DASD device driver, part 1 2008-01-26 14:11:28 +01:00
xpram.c [S390] convert xpram printks to pr_xxx macros. 2008-12-25 13:39:18 +01:00