1. 11 Jun, 2007 10 commits
  2. 14 Jun, 2007 2 commits
  3. 11 Jun, 2007 4 commits
  4. 14 Jun, 2007 1 commit
  5. 11 Jun, 2007 6 commits
  6. 14 Jun, 2007 1 commit
  7. 11 Jun, 2007 2 commits
  8. 14 Jun, 2007 1 commit
  9. 11 Jun, 2007 3 commits
  10. 13 Jun, 2007 8 commits
  11. 12 Jun, 2007 2 commits
    • Tejun Heo's avatar
      sysfs: fix race condition around sd->s_dentry, take#2 · dd14cbc9
      Tejun Heo authored
      Allowing attribute and symlink dentries to be reclaimed means
      sd->s_dentry can change dynamically.  However, updates to the field
      are unsynchronized leading to race conditions.  This patch adds
      sysfs_lock and use it to synchronize updates to sd->s_dentry.
      
      Due to the locking around ->d_iput, the check in sysfs_drop_dentry()
      is complex.  sysfs_lock only protect sd->s_dentry pointer itself.  The
      validity of the dentry is protected by dcache_lock, so whether dentry
      is alive or not can only be tested while holding both locks.
      
      This is minimal backport of sysfs_drop_dentry() rewrite in devel
      branch.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      dd14cbc9
    • Tejun Heo's avatar
      sysfs: fix condition check in sysfs_drop_dentry() · 6aa054aa
      Tejun Heo authored
      The condition check doesn't make much sense as it basically always
      succeeds.  This causes NULL dereferencing on certain cases.  It seems
      that parentheses are put in the wrong place.  Fix it.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6aa054aa