2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

mount: Prohibit second binfmt_misc superblock

This is need to catch the moment when binfmt_misc in mainline kernel is virtualized

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Kirill Tkhai
2016-09-13 17:50:05 +03:00
committed by Pavel Emelyanov
parent 6e83f54314
commit a5875ece59

View File

@@ -1461,6 +1461,7 @@ err:
static int binfmt_misc_dump(struct mount_info *pm)
{
static bool dumped = false;
struct cr_img *img = NULL;
struct dirent *de;
DIR *fdir = NULL;
@@ -1470,6 +1471,12 @@ static int binfmt_misc_dump(struct mount_info *pm)
if (ret <= 0)
return ret;
if (dumped) {
pr_err("Second binfmt_misc superblock\n");
return -1;
}
dumped = true;
fd = open_mountpoint(pm);
if (fd < 0)
return fd;