check: We need CAP_SYS_RESOURCE granted to perform testing

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2012-04-05 16:53:53 +04:00 committed by Pavel Emelyanov
parent 699caabdb9
commit 87d2ff5ee7

View file

@ -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;
}