1. 10 4月, 2009 1 次提交
  2. 07 4月, 2009 1 次提交
  3. 31 3月, 2009 1 次提交
    • A
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan 提交于
      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=12454Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
  4. 20 3月, 2009 1 次提交
  5. 19 3月, 2009 4 次提交
  6. 18 3月, 2009 3 次提交
  7. 16 3月, 2009 2 次提交
    • J
      Rationalize fasync return values · 60aa4924
      Jonathan Corbet 提交于
      Most fasync implementations do something like:
      
           return fasync_helper(...);
      
      But fasync_helper() will return a positive value at times - a feature used
      in at least one place.  Thus, a number of other drivers do:
      
           err = fasync_helper(...);
           if (err < 0)
                   return err;
           return 0;
      
      In the interests of consistency and more concise code, it makes sense to
      map positive return values onto zero where ->fasync() is called.
      
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      60aa4924
    • J
      Use f_lock to protect f_flags · db1dd4d3
      Jonathan Corbet 提交于
      Traditionally, changes to struct file->f_flags have been done under BKL
      protection, or with no protection at all.  This patch causes all f_flags
      changes after file open/creation time to be done under protection of
      f_lock.  This allows the removal of some BKL usage and fixes a number of
      longstanding (if microscopic) races.
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      db1dd4d3
  8. 09 3月, 2009 7 次提交
  9. 23 2月, 2009 1 次提交
  10. 18 2月, 2009 1 次提交
    • T
      ALSA: jack - Use card->shortname for input name · 2678f60d
      Takashi Iwai 提交于
      Currently the jack layer refers to card->longname as a part of
      its input device name string.  However, longname is often really long
      and way too ugly as an identifier, such as,
      "HDA Intel at 0xf8400000 irq 21".
      
      This patch changes the code to use card->shortname instead.
      The shortname string contains usually the h/w vendor and product
      names but without messy I/O port or IRQ numbers.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2678f60d
  11. 10 2月, 2009 1 次提交
  12. 05 2月, 2009 4 次提交
  13. 12 1月, 2009 1 次提交
    • T
      ALSA: Introduce snd_card_create() · 53fb1e63
      Takashi Iwai 提交于
      Introduced snd_card_create() function as a replacement of snd_card_new().
      The new function returns a negative error code so that the probe callback
      can return the proper error code, while snd_card_new() can give only NULL
      check.
      
      The old snd_card_new() is still provided as an inline function but with
      __deprecated attribute.  It'll be removed soon later.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      53fb1e63
  14. 07 1月, 2009 2 次提交
  15. 04 1月, 2009 1 次提交
  16. 18 12月, 2008 1 次提交
  17. 10 12月, 2008 1 次提交
  18. 08 12月, 2008 2 次提交
  19. 19 11月, 2008 1 次提交
  20. 13 11月, 2008 1 次提交
  21. 12 11月, 2008 1 次提交
  22. 03 11月, 2008 1 次提交
  23. 02 11月, 2008 1 次提交
    • A
      saner FASYNC handling on file close · 233e70f4
      Al Viro 提交于
      As it is, all instances of ->release() for files that have ->fasync()
      need to remember to evict file from fasync lists; forgetting that
      creates a hole and we actually have a bunch that *does* forget.
      
      So let's keep our lives simple - let __fput() check FASYNC in
      file->f_flags and call ->fasync() there if it's been set.  And lose that
      crap in ->release() instances - leaving it there is still valid, but we
      don't have to bother anymore.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      233e70f4