1. 08 Dec, 2011 2 commits
    • Andrey Vagin's avatar
      pipe: fix deadlock · ecc2776f
      Andrey Vagin authored
      Probably all of you know about "lock inversion". There was a similar
      problem on restoring pipes.
      
      One process try to restore pipe1 and waits when another process attached
      to it.  In this time another process restores pipe2 and waits too.
      
      I know two solves.
      1. Open all pipes -> attach to them -> close unnecessary ends.
      This method has a problem, if only one end belongs to the process.  In
      this cases another end occupies a descriptor, which may be needed to
      another pipe.
      
      2. Restore pipes in the same order. This patch does that.
      A sorted list of pipe entries are constructed.
      Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
      Acked-by: 's avatarPavel Emelianov <xemul@parallels.com>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      ecc2776f
    • Andrey Vagin's avatar
      pipe: change calculation of pipes users · c53972cd
      Andrey Vagin authored
      This patch removed stange logic about minusers.
      Now we calculate foreign users only.
      
      The main idea of this patch, that we bind a pipe ends to correct
      descriptos immediately.
      
      When a process X creates a pipe, we have two cases:
      1. Both ends belongs to this process. It's simple, we bind both ends
         to their descriptors and we go further.
      2. Only one end of a pipe belongs to this process. In this case we are
         waiting all foreign users and we go futher.
      In second case we should wait, because a end which doesn't belong to
      this process occupies a file descriptor, which may be used by another
      pipe.
      Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
      Acked-by: 's avatarPavel Emelianov <xemul@parallels.com>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      c53972cd
  2. 07 Dec, 2011 2 commits
  3. 06 Dec, 2011 1 commit
  4. 05 Dec, 2011 8 commits
  5. 03 Dec, 2011 1 commit
  6. 02 Dec, 2011 14 commits
  7. 01 Dec, 2011 5 commits
  8. 30 Nov, 2011 7 commits