All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: xenomai@xenomai.org
Cc: "Kiszka, Jan" <jan.kiszka@siemens.com>
Subject: Re: [Xenomai] [Xenomai-git] Jan Kiszka : cobalt/posix/sem: Fix locking imbalances in cobalt_sem_open
Date: Sat, 21 Sep 2013 10:31:11 +0200	[thread overview]
Message-ID: <523D594F.1050605@xenomai.org> (raw)
In-Reply-To: <E1VN5el-0002Ct-8K@xenomai.org>

On 09/20/2013 08:42 PM, git repository hosting wrote:
> Module: xenomai-jki
> Branch: for-forge
> Commit: 8775720ae828d1e1be076f91b93a3eeac1b7ed90
> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=8775720ae828d1e1be076f91b93a3eeac1b7ed90
>
> Author: Jan Kiszka <jan.kiszka@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.kiszka@siemens.com>
>

This fix should be backported to 2.6.

> ---
>
>   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
>


-- 
Philippe.


       reply	other threads:[~2013-09-21  8:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1VN5el-0002Ct-8K@xenomai.org>
2013-09-21  8:31 ` Philippe Gerum [this message]
2013-09-21  9:17   ` [Xenomai] [Xenomai-git] Jan Kiszka : cobalt/posix/sem: Fix locking imbalances in cobalt_sem_open Jan Kiszka
2013-09-21  9:56     ` Philippe Gerum
2013-09-21 10:00       ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=523D594F.1050605@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=jan.kiszka@siemens.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.