[01/10] pstree: fix my_pgid is on last level but vpid is on level 0

Submitted by Pavel Tikhomirov on July 4, 2017, 9:08 a.m.

Details

Message ID 20170704090809.8127-2-ptikhomirov@virtuozzo.com
State New
Series "rework pgid restore for pidnses"
Headers show

Commit Message

Pavel Tikhomirov July 4, 2017, 9:08 a.m.
Comparing ids in different pid namespaces is bug, though these
will be removed by following patches, still fix it to be on the
safe side.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 criu/cr-restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index f9d9b06..3ce27fd 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -1588,7 +1588,7 @@  static void restore_pgid(void)
 
 		leader = rsti(current)->pgrp_leader;
 		if (leader) {
-			BUG_ON(my_pgid != vpid(leader));
+			BUG_ON(vpgid(current) != vpid(leader));
 			futex_wait_until(&rsti(leader)->pgrp_set, 1);
 		}
 	}