mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 22:35:33 +00:00
check: check the mnt_id field in fdinfo
Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
a3ea8102ea
commit
8620912d22
18
cr-check.c
18
cr-check.c
@@ -249,6 +249,23 @@ static int check_one_sfd(union fdinfo_entries *e, void *arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int check_mnt_id(void)
|
||||||
|
{
|
||||||
|
struct fdinfo_common fdinfo = { .mnt_id = -1 };
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = parse_fdinfo(get_service_fd(LOG_FD_OFF), FD_TYPES__UND, NULL, &fdinfo);
|
||||||
|
if (ret < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (fdinfo.mnt_id == -1) {
|
||||||
|
pr_err("fdinfo doesn't contain the mnt_id field\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int check_fdinfo_signalfd(void)
|
static int check_fdinfo_signalfd(void)
|
||||||
{
|
{
|
||||||
int fd, ret;
|
int fd, ret;
|
||||||
@@ -573,6 +590,7 @@ int cr_check(void)
|
|||||||
ret |= check_mem_dirty_track();
|
ret |= check_mem_dirty_track();
|
||||||
ret |= check_posix_timers();
|
ret |= check_posix_timers();
|
||||||
ret |= check_tun();
|
ret |= check_tun();
|
||||||
|
ret |= check_mnt_id();
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
pr_msg("Looks good.\n");
|
pr_msg("Looks good.\n");
|
||||||
|
Reference in New Issue
Block a user