Module: xenomai-3 Branch: master Commit: 48d54b272b0d8053200418659a6691d47c278265 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=48d54b272b0d8053200418659a6691d47c278265
Author: Philippe Gerum <r...@xenomai.org> Date: Sun Sep 13 15:46:17 2015 +0200 cobalt/init: delay memory locking after binding Non-supervisor members of the allowed group (xenomai.allowed_group) are given the IPC_LOCK capability by the Cobalt binding syscall. So make sure the binding takes place before the process eventually attempts to lock its virtual address space to RAM. --- lib/cobalt/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c index 074d563..acad534 100644 --- a/lib/cobalt/init.c +++ b/lib/cobalt/init.c @@ -93,9 +93,6 @@ static void low_init(void) struct cobalt_featinfo *f; int ret; - if (mlockall(MCL_CURRENT | MCL_FUTURE)) - early_panic("mlockall: %s", strerror(errno)); - old_sigill_handler = signal(SIGILL, sigill_handler); if (old_sigill_handler == SIG_ERR) early_panic("signal(SIGILL): %s", strerror(errno)); @@ -121,6 +118,9 @@ static void low_init(void) early_panic("binding failed: %s", strerror(-ret)); } + if (mlockall(MCL_CURRENT | MCL_FUTURE)) + early_panic("mlockall: %s", strerror(errno)); + cobalt_check_features(f); cobalt_init_umm(f->vdso_offset); cobalt_init_current_keys(); _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git