Module: xenomai-forge
Branch: next
Commit: 8775720ae828d1e1be076f91b93a3eeac1b7ed90
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=8775720ae828d1e1be076f91b93a3eeac1b7ed90

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Fri Sep 20 20:39:18 2013 +0200

cobalt/posix/sem: Fix locking imbalances in cobalt_sem_open

We hold cobalt_assoc_lock, not nklock.

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

---

 kernel/cobalt/posix/sem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cobalt/posix/sem.c b/kernel/cobalt/posix/sem.c
index 076f2d2..60906fd 100644
--- a/kernel/cobalt/posix/sem.c
+++ b/kernel/cobalt/posix/sem.c
@@ -916,7 +916,7 @@ int cobalt_sem_open(unsigned long __user *u_addr,
        if (assoc) {
                usm = container_of(assoc, struct cobalt_usem, assoc);
                ++usm->refcnt;
-               xnlock_put_irqrestore(&nklock, s);
+               xnlock_put_irqrestore(&cobalt_assoc_lock, s);
                goto got_usm;
        }
 
@@ -936,7 +936,7 @@ int cobalt_sem_open(unsigned long __user *u_addr,
        assoc = cobalt_assoc_lookup(&cc->usems, (u_long)sm->sem);
        if (assoc) {
                container_of(assoc, struct cobalt_usem, assoc)->refcnt++;
-               xnlock_put_irqrestore(&nklock, s);
+               xnlock_put_irqrestore(&cobalt_assoc_lock, s);
                xnfree(usm);
                usm = container_of(assoc, struct cobalt_usem, assoc);
                goto got_usm;


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

Reply via email to