Module: xenomai-jki
Branch: maintenance-2.6
Commit: 29b10391eb8de5c26431d23039d01028d7733aa7
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=29b10391eb8de5c26431d23039d01028d7733aa7

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Mon Jan 11 14:04:14 2016 +0100

posix: Fix shadow mutex passed to pse51_mutex_check_init

Using the userspace data structure to call into pse51_mutex_check_init
triggers an SMAP error on modern Intel CPUs - for a good reason. This
was likely a copy&paste mistake, we rather want pass the shadowed kernel
structure here. pse51_mutex_check_init only reads from it, so there is
no state change lost then.

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

---

 ksrc/skins/posix/syscall.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ksrc/skins/posix/syscall.c b/ksrc/skins/posix/syscall.c
index 248ecfc..a5bcd6e 100644
--- a/ksrc/skins/posix/syscall.c
+++ b/ksrc/skins/posix/syscall.c
@@ -1299,7 +1299,7 @@ static int __pthread_mutex_check_init(struct pt_regs 
*regs)
        } else
                attr = NULL;
 
-       return pse51_mutex_check_init(&umx->shadow_mutex, attr);
+       return pse51_mutex_check_init(&mx.shadow_mutex, attr);
 }
 
 static int __pthread_mutex_init(struct pt_regs *regs)


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

Reply via email to