[CRIU] [PATCH 1/2] compel: Don't BUG if exec area is too small
Cyrill Gorcunov
gorcunov at openvz.org
Mon Dec 5 13:15:07 PST 2016
Simply return MAP_FAILED here.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
compel/src/lib/infect.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/compel/src/lib/infect.c b/compel/src/lib/infect.c
index adef4db9e30e..fd92ee5d1da6 100644
--- a/compel/src/lib/infect.c
+++ b/compel/src/lib/infect.c
@@ -1008,8 +1008,10 @@ static unsigned long find_executable_area(int pid)
/* f now points at " rwx" (yes, with space) part */
if (f[3] == 'x') {
- BUG_ON(end - start < PARASITE_START_AREA_MIN);
- ret = start;
+ if ((end - start) >= PARASITE_START_AREA_MIN)
+ ret = start;
+ else
+ pr_err("No sutable area found to run syscalls\n");
break;
}
}
--
2.7.4
More information about the CRIU
mailing list