1. 03 Oct, 2004 26 commits
  2. 02 Oct, 2004 2 commits
  3. 03 Oct, 2004 2 commits
  4. 02 Oct, 2004 4 commits
    • Linus Torvalds's avatar
      Fix close() vs posix lock race · b044105d
      Linus Torvalds authored
      A threaded app that posix-locks and closes the same file
      in two threads concurrently may result in a posix lock
      that was never visible to the closer, and that thus needs
      cleanup on the final fput.
      
      Handle it together with the regular flocks.
      b044105d
    • Alan Cox's avatar
      [PATCH] Update termios to use per tty semaphore · cf54a5af
      Alan Cox authored
      This makes the agreed change of termios locking to be semaphore based
      sleep locking. This is needed for USB in particular as it has to use
      messaging to issue terminal mode changes.
      
      This code passes Torvalds test grades 0, 1 and 2 (it looks ok, it
      compiles and it booted). It does mean that a driver cannot take an
      atomic peek at termios data during an interrupt. Nobody seems to be
      doing this although some of the driver receive paths for line
      disciplines will eventually want to (n_tty currently doesn't do this
      locked on the receive path). Since the ldisc is given a chance to copy
      any essential bits on the ->set_termios path this seems not to be a
      problem.
      cf54a5af
    • Linus Torvalds's avatar
      Partially undo Alan's recent tty locking fixes: the termios · d5978a21
      Linus Torvalds authored
      lock must not be held across the driver/ldisc downcalls.
      
      Some drivers need to set device state (baudrate etc) and may
      need to sleep.
      d5978a21
    • Alexander Viro's avatar
      [PATCH] Race with iput and umount · 6482f833
      Alexander Viro authored
      Jeff Mahoney notes:
      
       "generic_shutdown_super() will happily call the ->put_super fs method,
        destroying data structures still in use by the iput (->delete_inode)
        in progress. 
      
        The unlink path will call the ->unlink fs method, release the path
        (thus dropping the reference to the vfsmount, and then call iput.
        Since the vfsmount reference is dropped back to 1, a umount will
        succeed, causing the superblock to be cleaned up."
      
      Arrgh...  Here's the trivial fix: do the final "iput()" a bit earlier in
      the unlink path. 
      
      Note: all places that go to exit1: or exit: will have NULL inode, so we
      are not leaking anything here and it is OK do that iput() early; indeed,
      the goal of that kludge was to postpone the final iput() past the
      unlocking the parent for the sake of contention if a wunch of bankers is
      doing parallel unlink() on files in the same directory and normally it
      would happen on dput() after vfs_unlink())
      6482f833
  5. 01 Oct, 2004 6 commits