views:

216

answers:

2

According to the list of API changes in the 2.6 kernel series on LWN the .owner field of struct proc_dir_entry was removed in the 2.6.30 Kernel.

So here's a couple of questions:

  1. Was it really ever necessary or useful to set this field?
  2. Has the field just been moved somewhere else, or permanently deleted?

I ask the first question because while the LKMPG set's this field in many of it's examples, procfs_example.c from the Kernel Documentation never does.

+1  A: 

I am not a linux kernel expert, but maybe this entry makes some sense to you:

http://lkml.org/lkml/2009/1/26/342

HTH.

jrbjazz
+1  A: 

You may want to have a look at the bug filed in bugzilla.kernel.org. It has complete description of the issue and possible solution. Bugid is 12454
Hope this answers your question.

vinit dhatrak
Alexy's comments to that bug make it clear that other fixes have made the `->owner` entry unnecessary.
caf
@caf: I read the comments on the bug, and what's unclear is if owner needs to be set via the `file_operations` structure if I'm using `try_module_get(THIS_MODULE)` and `module_put(THIS_MODULE)` in the `fops.open` and `fops.close` routines I supply?
Robert S. Barnes