From 87d2ff5ee72ee55fdb77a4398f85f678b4067986 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 5 Apr 2012 16:53:53 +0400 Subject: [PATCH] check: We need CAP_SYS_RESOURCE granted to perform testing Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- cr-check.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cr-check.c b/cr-check.c index 800306b54..82032a5b4 100644 --- a/cr-check.c +++ b/cr-check.c @@ -92,7 +92,10 @@ static int check_prctl(void) ret = sys_prctl(PR_SET_MM, PR_SET_MM_BRK, sys_brk(0), 0, 0); if (ret) { - pr_msg("prctl: PR_SET_MM is not supported\n"); + if (ret == -EPERM) + pr_msg("prctl: One needs CAP_SYS_RESOURCE capability to perform testing\n"); + else + pr_msg("prctl: PR_SET_MM is not supported\n"); return -1; }