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

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Sat Sep 21 11:59:07 2013 +0200

skins/posix: Fix locking imbalances in __sem_open

We hold pse51_assoc_lock, not nklock.

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

---

 ksrc/skins/posix/syscall.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ksrc/skins/posix/syscall.c b/ksrc/skins/posix/syscall.c
index 2093edb..bd4651d 100644
--- a/ksrc/skins/posix/syscall.c
+++ b/ksrc/skins/posix/syscall.c
@@ -647,7 +647,7 @@ static int __sem_open(struct pt_regs *regs)
        if (assoc) {
                usm = assoc2usem(assoc);
                ++usm->refcnt;
-               xnlock_put_irqrestore(&nklock, s);
+               xnlock_put_irqrestore(&pse51_assoc_lock, s);
                goto got_usm;
        }
 
@@ -667,7 +667,7 @@ static int __sem_open(struct pt_regs *regs)
        assoc = pse51_assoc_lookup(&q->usems, (u_long)sm->shadow_sem.sem);
        if (assoc) {
                assoc2usem(assoc)->refcnt++;
-               xnlock_put_irqrestore(&nklock, s);
+               xnlock_put_irqrestore(&pse51_assoc_lock, s);
                xnfree(usm);
                usm = assoc2usem(assoc);
                goto got_usm;


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

Reply via email to