1. 20 Dec, 2013 4 commits
    • Andrey Vagin's avatar
      dump: try to stop a task as soon as possible · dc914912
      Andrey Vagin authored
      We read /proc/pid/status to determine a task state, but if a task is
      running in this moment, its state may be changed.
      
      This patch stops tasks before reading their /proc/pid/status
      Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      dc914912
    • Andrey Vagin's avatar
      crtools: rework freeze of processes (v2) · bf678790
      Andrey Vagin authored
      Before this patch crtools freezes processes and if something is changed,
      it unfreezes all processes and starts again from the beginning.
      
      If if are going to dump fork-bomb, this method doesn't work. Because a
      big tree is always changed.
      
      We don't need unfreeze processes, which have been frozen and this patch
      does that.
      
      This patch uses depth-first search (DFS) for traversing a process tree.
      
      A root task is frozen at first turn, than a child is frozen, than a
      child of child and so on.
      
      When all children of one process are frozen, criu reads the list of
      children again and check that nothing changed. This processes continues
      until all of them will not be frozen. Afte that a new child can not be
      appeared, because all children for children are frozen too.
      
      v2: add comments in code
      Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      bf678790
    • Andrey Vagin's avatar
      dump: rework freeze of threads · 978badc1
      Andrey Vagin authored
      When we try to freeze threads, some of them can exit
      and a few new ones can be born. Currently we unfreeze process free
      int this case, so we have the same chance to failed in the next case.
      
      I suggest to not unfreeze frozen threads, just try to update thread list
      and freeze unfrozen threads.
      Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      978badc1
    • Kir Kolyshkin's avatar
      mnt_tree_for_each_reverse(): init a variable · e2a0be63
      Kir Kolyshkin authored
      A warning catched by clang:
      
      > > mount.c:869:71: error: variable 'progress' is uninitialized when used here
      > >       [-Werror,-Wuninitialized]
      > >   ...prev, MNT_WALK_NONE, fn, (struct list_head *) NULL, progress);
      > >                                                          ^~~~~~~~
      > > mount.c:802:4: note: expanded from macro 'MNT_TREE_WALK'
      > >                         _prgs++;
      > > \
      > >                         ^
      > > mount.c:867:14: note: initialize the variable 'progress' to silence this
      > > warning
      > >         int progress;
      > >                     ^
      > >                      = 0
      > > 1 error generated.
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      e2a0be63
  2. 19 Dec, 2013 6 commits
  3. 18 Dec, 2013 29 commits
  4. 17 Dec, 2013 1 commit