mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 06:45:35 +00:00
files: Fix memory overflow checks for shared files.
Otherwise we skip shared segment overflow on big scales and tests sporadically fail. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
committed by
Cyrill Gorcunov
parent
153c033d7e
commit
a038cbd9b8
2
files.c
2
files.c
@@ -109,7 +109,7 @@ static int collect_fd(int pid, struct fdinfo_entry *e)
|
|||||||
pr_info("Collect fdinfo pid=%d fd=%ld id=%s\n", pid, e->addr, e->id);
|
pr_info("Collect fdinfo pid=%d fd=%ld id=%s\n", pid, e->addr, e->id);
|
||||||
|
|
||||||
nr_fdinfo_list++;
|
nr_fdinfo_list++;
|
||||||
if ((nr_fdinfo_descs) * sizeof(struct fdinfo_list_entry) >= 4096) {
|
if ((nr_fdinfo_list) * sizeof(struct fdinfo_list_entry) >= 4096) {
|
||||||
pr_panic("OOM storing fdinfo_list_entries\n");
|
pr_panic("OOM storing fdinfo_list_entries\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user