1. 12 12月, 2009 14 次提交
  2. 16 6月, 2009 1 次提交
  3. 24 4月, 2009 1 次提交
    • A
      USB: g_file_storage: fix use-after-free bug when closing files · 82a10a81
      Alan Stern 提交于
      This patch (as1231) fixes a use-after-free bug in g_file_storage.  A
      device's name may not be available after the device is unregistered,
      even if the device structure itself is still allocated.  Since
      close_backing_file() prints a LUN's name for debugging, it shouldn't
      be called after the LUN has been unregistered.
      
      That whole area needed to be cleaned up; the backing files were
      getting closed in a couple of different places.  The patch fixes
      things so that they get closed in just one place, as part of the
      unbind procedure, immediately before the LUN is unregistered.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      82a10a81
  4. 25 3月, 2009 1 次提交
  5. 16 3月, 2009 1 次提交
    • 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
  6. 28 2月, 2009 1 次提交
  7. 08 1月, 2009 2 次提交
  8. 06 1月, 2009 1 次提交
    • C
      add a vfs_fsync helper · 4c728ef5
      Christoph Hellwig 提交于
      Fsync currently has a fdatawrite/fdatawait pair around the method call,
      and a mutex_lock/unlock of the inode mutex.  All callers of fsync have
      to duplicate this, but we have a few and most of them don't quite get
      it right.  This patch adds a new vfs_fsync that takes care of this.
      It's a little more complicated as usual as ->fsync might get a NULL file
      pointer and just a dentry from nfsd, but otherwise gets afile and we
      want to take the mapping and file operations from it when it is there.
      
      Notes on the fsync callers:
      
       - ecryptfs wasn't calling filemap_fdatawrite / filemap_fdatawait on the
         	lower file
       - coda wasn't calling filemap_fdatawrite / filemap_fdatawait on the host
      	file, and returning 0 when ->fsync was missing
       - shm wasn't calling either filemap_fdatawrite / filemap_fdatawait nor
         taking i_mutex.  Now given that shared memory doesn't have disk
         backing not doing anything in fsync seems fine and I left it out of
         the vfs_fsync conversion for now, but in that case we might just
         not pass it through to the lower file at all but just call the no-op
         simple_sync_file directly.
      
      [and now actually export vfs_fsync]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      4c728ef5
  9. 18 10月, 2008 2 次提交
  10. 17 10月, 2008 1 次提交
  11. 26 7月, 2008 1 次提交
  12. 22 7月, 2008 2 次提交
  13. 03 5月, 2008 1 次提交
  14. 25 4月, 2008 2 次提交
  15. 15 2月, 2008 1 次提交
  16. 02 2月, 2008 1 次提交
  17. 20 10月, 2007 1 次提交
  18. 13 10月, 2007 4 次提交
  19. 23 8月, 2007 2 次提交