mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
restore: fix race in calculation of a number of zombies
Currently each task subtracts number of zombies from task_entries->nr_threads without locks, so if two tasks will do this operation concurrently, the result may be unpredictable. https://github.com/xemul/criu/issues/13 Cc: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by: Andrew Vagin <avagin@openvz.org> Acked-by: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
9d9518b852
commit
f13ec96e58
3 changed files with 9 additions and 2 deletions
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
struct task_entries {
|
||||
int nr_threads, nr_tasks, nr_helpers;
|
||||
atomic_t nr_zombies;
|
||||
futex_t nr_in_progress;
|
||||
futex_t start;
|
||||
atomic_t cr_err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue