]> git.baikalelectronics.ru Git - kernel.git/commit
proc 1/2: do PDE usecounting even for ->read_proc, ->write_proc
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 20 Feb 2009 14:04:33 +0000 (17:04 +0300)
committerAlexey Dobriyan <adobriyan@gmail.com>
Mon, 30 Mar 2009 21:14:27 +0000 (01:14 +0400)
commitacb987a1e0c792eb129099e490abe7639154d289
tree54df7ab53c1f625179e2b69c78b782b5a867363e
parent4f49b9d35e0bd79b2e43909751ecf090b2a88d41
proc 1/2: do PDE usecounting even for ->read_proc, ->write_proc

struct proc_dir_entry::owner is going to be removed. Now it's only necessary
to protect PDEs which are using ->read_proc, ->write_proc hooks.

However, ->owner assignments are racy and make it very easy for someone to switch
->owner on live PDE (as some subsystems do) without fixing refcounts and so on.

http://bugzilla.kernel.org/show_bug.cgi?id=12454

So, ->owner is on death row.

Proxy file operations exist already (proc_file_operations), just bump usecount
when necessary.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
fs/proc/generic.c
fs/proc/inode.c
fs/proc/internal.h