[CRIU] [crtools-bot] files: Fix memory overflow checks for shared
files.
Cyrill Gorcunov
gorcunov at openvz.org
Wed Feb 1 16:34:40 EST 2012
The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit a038cbd9b8800bca5af3e79c033f20708ac10ab1
Author: Pavel Emelyanov <xemul at parallels.com>
Date: Thu Feb 2 01:28:16 2012 +0400
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 at parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
files.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/files.c b/files.c
index 7cafa69..2350049 100644
--- a/files.c
+++ b/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);
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;
}
More information about the CRIU
mailing list