Module: xenomai-2.6
Branch: master
Commit: 922acdec0bad1580ddbd1bdba43e7d8833a9065d
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=922acdec0bad1580ddbd1bdba43e7d8833a9065d

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Jul 27 10:36:05 2013 +0200

nucleus: emit rejected syscall id upon spurious non-shadow call

---

 ksrc/nucleus/shadow.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index 50ee035..0d4c60a 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -2255,6 +2255,9 @@ int do_hisyscall_event(unsigned event, 
rthal_pipeline_stage_t *stage,
        if (!__xn_reg_mux_p(regs))
                goto linux_syscall;
 
+       muxid = __xn_mux_id(regs);
+       muxop = __xn_mux_op(regs);
+
        /*
         * Executing Xenomai services requires CAP_SYS_NICE, except for
         * __xn_sys_bind which does its own checks.
@@ -2263,9 +2266,6 @@ int do_hisyscall_event(unsigned event, 
rthal_pipeline_stage_t *stage,
            __xn_reg_mux(regs) != __xn_mux_code(0, __xn_sys_bind))
                goto no_permission;
 
-       muxid = __xn_mux_id(regs);
-       muxop = __xn_mux_op(regs);
-
        trace_mark(xn_nucleus, syscall_histage_entry,
                   "thread %p thread_name %s muxid %d muxop %d",
                   thread, thread ? xnthread_name(thread) : NULL,
@@ -2283,8 +2283,8 @@ int do_hisyscall_event(unsigned event, 
rthal_pipeline_stage_t *stage,
        no_permission:
                if (XENO_DEBUG(NUCLEUS))
                        printk(KERN_WARNING
-                              "Xenomai: non-shadow %s[%d] was denied a 
real-time call\n",
-                              current->comm, current->pid);
+                              "Xenomai: non-shadow %s[%d] was denied a 
real-time call (%s/%d)\n",
+                              current->comm, current->pid, 
muxtable[muxid].props->name, muxop);
                __xn_error_return(regs, -EPERM);
                goto ret_handled;
        }


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

Reply via email to