1. 16 3月, 2009 1 次提交
    • 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
  2. 11 3月, 2009 2 次提交
    • J
      HID: fix waitqueue usage in hiddev · 96fe2ab8
      Johannes Weiner 提交于
      DECLARE_WAITQUEUE doesn't initialize the wait descriptor's task_list
      to 'empty' but to zero.
      
      prepare_to_wait() will not enqueue the descriptor to the waitqueue and
      finish_wait() will do list_del_init() on a list head that contains
      NULL pointers, which oopses.
      
      This was introduced by 07903407 "HID: hiddev cleanup -- handle all
      error conditions properly".
      
      The prior code used an unconditional add_to_waitqueue() which didn't
      care about the wait descriptor's list head and enqueued the thing
      unconditionally.
      
      The new code uses prepare_to_wait() which DOES check the prior list
      state, so use DEFINE_WAIT instead.
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Cc: Oliver Neukum <oliver@neukum.name>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      96fe2ab8
    • J
      HID: fix incorrect free in hiddev · 48e7a3c9
      Johannes Weiner 提交于
      If hiddev_open() fails, it wrongly frees the shared hiddev structure
      kept in hiddev_table instead of the hiddev_list structure allocated
      for the opened file descriptor.  Existing references to this structure
      will then accessed free memory.
      
      This was introduced by 07903407 "HID: hiddev cleanup -- handle all
      error conditions properly".
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Cc: Oliver Neukum <oliver@neukum.name>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      48e7a3c9
  3. 17 2月, 2009 3 次提交
  4. 29 1月, 2009 4 次提交
  5. 08 1月, 2009 2 次提交
  6. 04 1月, 2009 21 次提交
  7. 28 11月, 2008 1 次提交
  8. 23 11月, 2008 1 次提交
  9. 20 11月, 2008 2 次提交
  10. 17 11月, 2008 1 次提交
  11. 14 11月, 2008 1 次提交
  12. 13 11月, 2008 1 次提交