Commit a038cbd9 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Cyrill Gorcunov

files: Fix memory overflow checks for shared files.

Otherwise we skip shared segment
overflow on big scales and tests sporadically fail.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 153c033d
......@@ -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;
}
......
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