Files
ack-tegra/drivers/net
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
..
2009-03-28 20:29:51 +00:00
2009-03-23 01:18:58 -07:00
2009-03-26 01:10:00 -07:00
2009-03-21 22:37:56 -07:00
2009-01-21 14:02:21 -08:00
2009-03-27 00:46:38 -07:00
2009-01-21 14:02:23 -08:00
2009-01-21 14:02:24 -08:00
2009-01-21 14:02:24 -08:00
2009-01-21 14:02:25 -08:00
2009-03-18 18:17:48 -07:00
2009-02-12 16:53:48 -08:00
2009-02-12 16:53:22 -08:00
2009-03-02 22:32:48 -08:00
2009-02-15 23:32:01 -08:00
2009-02-15 23:32:01 -08:00
2009-02-15 23:32:01 -08:00
2009-03-02 22:32:43 -08:00
2009-03-22 21:28:39 -07:00
2009-01-21 14:33:50 -08:00
2009-03-21 19:06:53 -07:00
2009-02-01 00:58:26 -08:00
2009-03-10 05:29:52 -07:00
2009-02-04 16:43:44 -08:00
2009-02-26 21:02:19 -08:00
2009-01-21 14:33:50 -08:00
2009-01-21 14:33:50 -08:00
2009-03-27 00:46:48 -07:00
2009-03-27 00:46:53 -07:00
2009-03-27 00:46:53 -07:00
2009-01-21 14:33:50 -08:00
2009-03-13 16:09:12 -07:00
2009-03-13 16:09:12 -07:00
2009-03-13 16:09:12 -07:00
2009-01-21 14:33:50 -08:00
2009-01-21 14:03:42 -08:00
2009-03-18 23:31:49 -07:00
2009-01-21 14:33:50 -08:00
2009-02-03 15:08:36 -08:00
2009-03-27 00:46:48 -07:00
2009-03-20 00:51:22 -07:00
2009-02-26 23:20:56 -08:00
2009-02-26 23:20:56 -08:00
2009-03-04 15:08:19 -08:00
2009-02-14 20:46:39 -08:00
2009-03-02 22:15:09 -08:00
2009-03-03 23:36:04 -08:00
2009-01-11 00:06:36 -08:00
2009-01-21 14:02:31 -08:00