Skip to content
Snippets Groups Projects
  1. Dec 04, 2009
  2. Dec 03, 2009
  3. Nov 19, 2009
  4. Nov 18, 2009
  5. Oct 13, 2009
  6. Oct 11, 2009
  7. Sep 26, 2009
  8. Sep 10, 2009
  9. Sep 01, 2009
  10. Aug 25, 2009
  11. Aug 23, 2009
  12. Aug 09, 2009
  13. Jul 12, 2009
  14. Jul 05, 2009
  15. Jun 29, 2009
  16. Jun 13, 2009
  17. Jun 12, 2009
  18. May 29, 2009
  19. Apr 21, 2009
  20. Apr 17, 2009
  21. Apr 16, 2009
  22. Mar 30, 2009
    • Alexey Dobriyan's avatar
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan authored
      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: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
  23. Mar 27, 2009
  24. Mar 21, 2009
Loading