2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 05:18:00 +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:
Pavel Emelyanov 2012-02-02 01:28:16 +04:00 committed by Cyrill Gorcunov
parent 153c033d7e
commit a038cbd9b8

View File

@ -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);
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");
return -1;
}