Module: xenomai-3
Branch: master
Commit: 55797eb5d9d24651a0fce84aeceaf421a7f42f21
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=55797eb5d9d24651a0fce84aeceaf421a7f42f21

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Fri Feb 20 16:50:15 2015 +0100

cobalt/posix/syscall: Exclude sc_cobalt_get_current from debug warnings

This syscall is used for probing the context, thus may be triggered by
non-RT threads as well which we should not report as potential error.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 kernel/cobalt/posix/syscall.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c
index b5d4d1c..bc33c96 100644
--- a/kernel/cobalt/posix/syscall.c
+++ b/kernel/cobalt/posix/syscall.c
@@ -851,7 +851,11 @@ static int handle_head_syscall(struct ipipe_domain *ipd, 
struct pt_regs *regs)
         * sc_cobalt_bind which does its own checks.
         */
        if (unlikely(!allowed_syscall(process, thread, sysflags, nr))) {
-               if (XENO_DEBUG(COBALT))
+               /*
+                * Exclude get_current from reporting, it is used to probe the
+                * execution context.
+                */
+               if (XENO_DEBUG(COBALT) && nr != sc_cobalt_get_current)
                        printk(XENO_WARNING
                               "syscall <%d> denied to %s[%d]\n",
                               nr, current->comm, current->pid);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to