Commit 8620912d authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

check: check the mnt_id field in fdinfo

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a3ea8102
...@@ -249,6 +249,23 @@ static int check_one_sfd(union fdinfo_entries *e, void *arg) ...@@ -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) ...@@ -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");
......
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