Commit b939a4df authored by Pavel Tikhomirov's avatar Pavel Tikhomirov Committed by Andrei Vagin

dump/files: remove a leftover from dead_pid_conflict

In commit 23b76949 ("dump: optimize dead_pid_conflict by searching
in rbtree") we'd replaced for_each_pstree_item and thread walk search
with pstree_pid_by_virt (rb-tree search). The latter already found us
the thread with conflicting pid if it exists, the only thing left is to
skip if the thread is also a main thread of the thread group (as it was
before patch). But some leftover left which checks something wrong: we
index ->threads array with "i", but "i" is not a number of the thread
it is a number of current dead pid.

Not sure if it helps with the initial bug and duplicates, but it might:
https://jira.sw.ru/browse/PSBM-55217Signed-off-by: 's avatarPavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent ed2e5d40
......@@ -964,18 +964,9 @@ int dead_pid_conflict(void)
if (!node)
continue;
if (node->state != TASK_THREAD) {
struct pstree_item *item;
/*
* If the dead PID was given to a main thread of another
* process, this is handled during restore.
*/
item = node->item;
if (item->pid->real == item->threads[i].real ||
item->threads[i].ns[0].virt != pid)
continue;
}
/* Main thread */
if (node->state != TASK_THREAD)
continue;
pr_err("Conflict with a dead task with the same PID as of this thread (virt %d, real %d).\n",
node->ns[0].virt, node->real);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment