From a038cbd9b8800bca5af3e79c033f20708ac10ab1 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Thu, 2 Feb 2012 01:28:16 +0400 Subject: [PATCH] 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 Signed-off-by: Cyrill Gorcunov --- files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files.c b/files.c index 7cafa69d4..23500497e 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; }