Module: xenomai-gch
Branch: 2.6-fpu_trace
Commit: cbec7d33e88271c58471f51225a88fe5f80d427b
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=cbec7d33e88271c58471f51225a88fe5f80d427b

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sat Mar 23 21:44:58 2013 +0100

nucleus/shadow.c: fix for Linux 3.8

---

 include/asm-generic/wrappers.h |    4 ++++
 ksrc/nucleus/shadow.c          |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
index e71bcc3..0fb47a9 100644
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -741,6 +741,10 @@ unsigned long vm_mmap(struct file *file, unsigned long 
addr,
 
 #endif /* LINUX_VERSION_CODE < 3.4.0 */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
+#define KGIDT_INIT(pid) (pid)
+#endif /* LINUX < 3.8.0 */
+
 #include <linux/seq_file.h>
 #ifndef SEQ_START_TOKEN
 #define SEQ_START_TOKEN ((void *)1)
diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index ed3864b..7c4e032 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -1780,7 +1780,7 @@ static int xnshadow_sys_bind(struct pt_regs *regs)
                return -ENOEXEC;
 
        if (!capable(CAP_SYS_NICE) &&
-           (xn_gid_arg == -1 || !in_group_p(xn_gid_arg)))
+           (xn_gid_arg == -1 || !in_group_p(KGIDT_INIT(xn_gid_arg))))
                return -EPERM;
 
        /* Raise capabilities for the caller in case they are lacking yet. */


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

Reply via email to