android_kernel_xiaomi_sm8350/drivers/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
..
aoe net: convert usage of packet_type to read_mostly 2009-03-10 05:22:43 -07:00
paride paride/pg.c: xs(): &&/|| confusion 2009-02-18 10:32:01 +01:00
amiflop.c m68k: amiflop - Get rid of sleep_on calls 2009-01-12 20:56:33 +01:00
ataflop.c m68k: atari - Rename "mfp" to "st_mfp" 2009-02-22 09:23:02 -08:00
brd.c
cciss_cmd.h cciss: switch to using hlist for command list management 2008-12-29 08:28:43 +01:00
cciss_scsi.c
cciss_scsi.h
cciss.c cciss: add BUILD_BUG_ON() for catching bad CommandList_struct alignment 2009-03-24 12:35:16 +01:00
cciss.h cciss: switch to using hlist for command list management 2008-12-29 08:28:43 +01:00
cpqarray.c cpqarray: enable bus mastering 2009-03-24 12:35:17 +01:00
cpqarray.h
cryptoloop.c
DAC960.c
DAC960.h
floppy.c platform: make better use of to_platform_{device,driver}() macros 2009-03-24 16:38:24 -07:00
hd.c
ida_cmd.h
ida_ioctl.h
Kconfig m68k: mac - Add SWIM floppy support 2009-03-26 21:15:27 +01:00
loop.c loop: fix circular locking in loop_clr_fd() 2009-03-26 11:01:19 +01:00
Makefile m68k: mac - Add SWIM floppy support 2009-03-26 21:15:27 +01:00
nbd.c nbd: fix I/O hang on disconnected nbds 2009-02-11 14:25:37 -08:00
pktcdvd.c pktcdvd: remove broken dev_t export of class devices 2008-12-10 10:03:32 -08:00
ps3disk.c powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/block 2009-01-16 16:15:13 +11:00
ps3vram.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
smart1,2.h
sunvdc.c sparc64: Fix unsigned long long warnings in drivers. 2009-01-06 13:20:38 -08:00
swim3.c
swim_asm.S m68k: mac - Add SWIM floppy support 2009-03-26 21:15:27 +01:00
swim.c m68k: mac - Add SWIM floppy support 2009-03-26 21:15:27 +01:00
sx8.c
ub.c usb-storage: prepare for subdriver separation 2009-03-24 16:20:34 -07:00
umem.c
umem.h
viodasd.c
virtio_blk.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 2008-12-30 17:37:25 -08:00
xd.c
xd.h
xen-blkfront.c Fix kernel NULL pointer dereference in xen-blkfront 2009-03-05 12:04:57 +01:00
xsysace.c Fix Xilinx SystemACE driver to handle empty CF slot 2009-03-14 21:06:52 +01:00
z2ram.c